huff 1.5.4__py3-none-any.whl → 1.5.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
huff/models.py CHANGED
@@ -4,8 +4,8 @@
4
4
  # Author: Thomas Wieland
5
5
  # ORCID: 0000-0001-5168-9846
6
6
  # mail: geowieland@googlemail.com
7
- # Version: 1.5.4
8
- # Last update: 2025-07-18 18:07
7
+ # Version: 1.5.5
8
+ # Last update: 2025-07-26 13:42
9
9
  # Copyright (c) 2025 Thomas Wieland
10
10
  #-----------------------------------------------------------------------
11
11
 
@@ -944,15 +944,21 @@ class InteractionMatrix:
944
944
 
945
945
  def hansen(
946
946
  self,
947
- from_origins: bool = True
947
+ from_origins: bool = True,
948
+ exclude_self: bool = True,
949
+ check_df_vars: bool = True
948
950
  ):
949
951
 
950
952
  interaction_matrix_df = self.interaction_matrix_df
951
953
 
954
+ if exclude_self:
955
+
956
+ interaction_matrix_df = interaction_matrix_df[interaction_matrix_df["i"] != interaction_matrix_df["j"]]
957
+
952
958
  if from_origins:
953
959
 
954
- if interaction_matrix_df["U_ij"].isna().all():
955
- self.utility()
960
+ if "U_ij" not in interaction_matrix_df.columns or interaction_matrix_df["U_ij"].isna().all():
961
+ self.utility(check_df_vars = check_df_vars)
956
962
  interaction_matrix_df = self.interaction_matrix_df
957
963
 
958
964
  hansen_df = pd.DataFrame(interaction_matrix_df.groupby("i")["U_ij"].sum()).reset_index()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: huff
3
- Version: 1.5.4
3
+ Version: 1.5.5
4
4
  Summary: huff: Huff Model Market Area Analysis
5
5
  Author: Thomas Wieland
6
6
  Author-email: geowieland@googlemail.com
@@ -28,10 +28,10 @@ Thomas Wieland [ORCID](https://orcid.org/0000-0001-5168-9846) [EMail](mailto:geo
28
28
  See the /tests directory for usage examples of most of the included functions.
29
29
 
30
30
 
31
- ## Updates v1.5.4
31
+ ## Updates v1.5.5
32
32
  - Bugfixes:
33
- - Use of check_vars() is now optional (default: True)
34
- - Correction of args argument when calling minimize() in huff_ml_fit()
33
+ - Removing i = j cases in InteractionMatrix.hansen()
34
+ - InteractionMatrix.utility(): Check for utility column
35
35
 
36
36
 
37
37
  ## Features
@@ -1,6 +1,6 @@
1
1
  huff/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  huff/gistools.py,sha256=fgeE1IsUO7UIaawb23kuiz_Rlxn7T18iLLTA5yvgp74,7038
3
- huff/models.py,sha256=2s-NQoPuP8q7iwJK3tA6S9-qDGMgRGah9vgL4aJerrU,134607
3
+ huff/models.py,sha256=yrV4enajAG0bHCgrGh3w-SNX5kJDJnuE28i6RXN30HE,134903
4
4
  huff/ors.py,sha256=JlO2UEishQX87PIiktksOrVT5QdB-GEWgjXcxoR_KuA,11929
5
5
  huff/osm.py,sha256=9A-7hxeZyjA2r8w2_IqqwH14qq2Y9AS1GxVKOD7utqs,7747
6
6
  huff/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -24,7 +24,7 @@ huff/tests/data/Haslach_supermarkets.qmd,sha256=JlcOYzG4vI1NH1IuOpxwIPnJsCyC-pDR
24
24
  huff/tests/data/Haslach_supermarkets.shp,sha256=X7QbQ0BTMag_B-bDRbpr-go2BQIXo3Y8zMAKpYZmlps,324
25
25
  huff/tests/data/Haslach_supermarkets.shx,sha256=j23QHX-SmdAeN04rw0x8nUOran-OCg_T6r_LvzzEPWs,164
26
26
  huff/tests/data/Wieland2015.xlsx,sha256=H4rxCFlctn44-O6mIyeFf67FlgvznLX7xZqpoWYS41A,25788
27
- huff-1.5.4.dist-info/METADATA,sha256=Dq-uRGKbKUqNSvB9xUGbox7tRLNB0PDL7QBA_NLfAds,6025
28
- huff-1.5.4.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
29
- huff-1.5.4.dist-info/top_level.txt,sha256=nlzX-PxZNFmIxANIJMySuIFPihd6qOBkRlhIC28NEsQ,5
30
- huff-1.5.4.dist-info/RECORD,,
27
+ huff-1.5.5.dist-info/METADATA,sha256=EmguUFYBD-ZCMDzsciDWpbsgJJb5jdJolrHxSh1KmfA,6009
28
+ huff-1.5.5.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
29
+ huff-1.5.5.dist-info/top_level.txt,sha256=nlzX-PxZNFmIxANIJMySuIFPihd6qOBkRlhIC28NEsQ,5
30
+ huff-1.5.5.dist-info/RECORD,,
File without changes