rastr 0.7.0__py3-none-any.whl → 0.7.1__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.
rastr/_version.py CHANGED
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '0.7.0'
32
- __version_tuple__ = version_tuple = (0, 7, 0)
31
+ __version__ = version = '0.7.1'
32
+ __version_tuple__ = version_tuple = (0, 7, 1)
33
33
 
34
34
  __commit_id__ = commit_id = None
rastr/gis/smooth.py CHANGED
@@ -132,10 +132,14 @@ def _recursive_eval(slice4: NDArray, tangents: NDArray, ts: NDArray) -> NDArray:
132
132
  for r in range(1, 4):
133
133
  idx = max(r - 2, 0)
134
134
  denom = tangents[r - idx : 4 - idx] - tangents[idx : 4 - r + idx]
135
- denom = np.where(denom == 0, np.finfo(float).eps, denom) # avoid div 0
136
135
 
137
136
  # Compute weights for all parameter values at once
138
- left_w = (tangents[r - idx : 4 - idx][None, :] - ts[:, None]) / denom
137
+ with np.errstate(divide="ignore", invalid="ignore"):
138
+ left_w = (tangents[r - idx : 4 - idx][None, :] - ts[:, None]) / denom
139
+
140
+ left_w[:, denom == 0] = (
141
+ 0.5 # Use 0.5 (midpoint) when points are identical (zero denominator)
142
+ )
139
143
  right_w = 1 - left_w
140
144
 
141
145
  # Weighted sums between consecutive points
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rastr
3
- Version: 0.7.0
3
+ Version: 0.7.1
4
4
  Summary: Geospatial Raster datatype library for Python.
5
5
  Project-URL: Source Code, https://github.com/tonkintaylor/rastr
6
6
  Project-URL: Bug Tracker, https://github.com/tonkintaylor/rastr/issues
7
7
  Project-URL: Releases, https://github.com/tonkintaylor/rastr/releases
8
- Project-URL: Source Archive, https://github.com/tonkintaylor/rastr/archive/2b485cc676121c82f468dca7733e444c3033abbe.zip
8
+ Project-URL: Source Archive, https://github.com/tonkintaylor/rastr/archive/f84ab299005d87e37339d53759e005e85c9e5ad2.zip
9
9
  Author-email: Tonkin & Taylor Limited <Sub-DisciplineData+AnalyticsStaff@tonkintaylor.co.nz>, Nathan McDougall <nmcdougall@tonkintaylor.co.nz>, Ben Karl <bkarl@tonkintaylor.co.nz>
10
10
  License-Expression: MIT
11
11
  License-File: LICENSE
@@ -1,5 +1,5 @@
1
1
  rastr/__init__.py,sha256=z26KywZdRKwO-N5Qc34SuuGGwH8Y812csKORc3S4SYU,113
2
- rastr/_version.py,sha256=uLbRjFSUZAgfl7V7O8zKV5Db36k7tz87ZIVq3l2SWs0,704
2
+ rastr/_version.py,sha256=az9tfX88VBVbBBILFx2zOlpMh1RBTXIwP6baQTMKtHc,704
3
3
  rastr/create.py,sha256=jT2X7mgJoMapnRz-M11dJoKFidaf0k_qleR5zxnRAnw,13195
4
4
  rastr/io.py,sha256=RPhypnSNhLaWYdGRzctM9aTXbw9_TuMjvhMvDyUZavk,3640
5
5
  rastr/meta.py,sha256=lUZVodFzhnzLI1sr7SgiM9XN9D-n7nXvs0voWTJYlMg,5980
@@ -10,8 +10,8 @@ rastr/gis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
10
  rastr/gis/crs.py,sha256=9K57Ys6P32v0uzap-l7L_HbjolJMX-ETuRB_rN30Qz0,1953
11
11
  rastr/gis/fishnet.py,sha256=nAiJ_DuSQP326pLM9JmI8A4QwWWgVu7Mae1K1dWjDc4,3108
12
12
  rastr/gis/interpolate.py,sha256=DzjtD5ynnwKP7TrwPiK3P0dOy5ZRzME9bV8-7tn5TFk,1697
13
- rastr/gis/smooth.py,sha256=FeEiO9RNyX9bP_yM2bvgQPLGyF0lHjll20ur52ehp1c,5182
14
- rastr-0.7.0.dist-info/METADATA,sha256=yc3gYgbIgMLAoUeubfE0rXiJtN1b9YPbz4Yjewrr0QE,5724
15
- rastr-0.7.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
16
- rastr-0.7.0.dist-info/licenses/LICENSE,sha256=7qUsx93G2ATTRLZiSYuQofwAX_uWvrqnAiMK8PzxvNc,1080
17
- rastr-0.7.0.dist-info/RECORD,,
13
+ rastr/gis/smooth.py,sha256=bGNBFs7PYW_J_vzcX0h2VL2R0o4dX3Da_nEm7Pjivlw,5295
14
+ rastr-0.7.1.dist-info/METADATA,sha256=-MvdAkql2szGVK4jAI2Kw3evRhIYq3daQBmvPAfpJ0o,5724
15
+ rastr-0.7.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
16
+ rastr-0.7.1.dist-info/licenses/LICENSE,sha256=7qUsx93G2ATTRLZiSYuQofwAX_uWvrqnAiMK8PzxvNc,1080
17
+ rastr-0.7.1.dist-info/RECORD,,
File without changes