Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from datetime import datetime
from pathlib import Path
from importlib.metadata import version
from packaging.version import Version

sys.path.append(str(Path("_ext").resolve()))
sys.path.append(str(Path().parent.resolve()))
Expand All @@ -44,8 +45,8 @@

# The full version, including alpha/beta/rc tags.
release = version("geoh5py")
# The short X.Y.Z version.
version = ".".join(release.split(".")[:3])
# The shorter X.Y.Z version.
version = Version(release).base_version

# If your documentation needs a minimal Sphinx version, state it here.
needs_sphinx = "2.2.1"
Expand Down
2 changes: 1 addition & 1 deletion geoh5py/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

# flake8: noqa

__version__ = "0.10.0"
__version__ = "0.10.1"

import inspect

Expand Down
4 changes: 1 addition & 3 deletions geoh5py/objects/drillhole.py
Original file line number Diff line number Diff line change
Expand Up @@ -811,12 +811,10 @@ def compute_intervals(survey: np.ndarray, collar, end_of_hole) -> dict:
norm[norm == 0.0] = INFINITE_RADIUS
tangential /= norm[:, None]
alpha = np.abs(0.5 * np.pi - np.arctan2(dot, vr))
alpha[alpha == 0.0] = INFINITE_RADIUS**-1.0
delta_depth = np.diff(full_survey[:, 0])
radius = delta_depth / alpha

radius[alpha == 0.0] = delta_depth[alpha == 0.0] * INFINITE_RADIUS
alpha[alpha == 0.0] = delta_depth[alpha == 0.0] / radius[alpha == 0.0]

intervals = {
"depths": np.r_[full_survey[:, 0]],
"rad": np.r_[radius, INFINITE_RADIUS],
Expand Down
5 changes: 2 additions & 3 deletions geoh5py/objects/grid_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,11 @@ def origin(self, values: np.ndarray | list | tuple):
raise ValueError(f"Array of 'origin' must be of dtype = {ORIGIN_TYPE}")

self._centroids = None
self._origin = values

if getattr(self, "_origin", None) is not None and self.on_file:
if self.on_file:
self.workspace.update_attribute(self, "attributes")

self._origin = values

@property
@abstractmethod
def shape(self) -> np.ndarray:
Expand Down
9 changes: 9 additions & 0 deletions geoh5py/objects/octree.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,9 @@ def u_cell_size(self, value: Real):
raise TypeError("Attribute 'u_cell_size' must be type(float).")

self._u_cell_size = float(value)
self._centroids = None
if self.on_file:
self.workspace.update_attribute(self, "attributes")

@property
def u_count(self) -> int:
Expand All @@ -244,6 +247,9 @@ def v_cell_size(self, value: Real):
raise TypeError("Attribute 'v_cell_size' must be type(float).")

self._v_cell_size = float(value)
self._centroids = None
if self.on_file:
self.workspace.update_attribute(self, "attributes")

@property
def v_count(self) -> int:
Expand Down Expand Up @@ -323,6 +329,9 @@ def w_cell_size(self, value: Real):
raise TypeError("Attribute 'w_cell_size' must be type(float).")

self._w_cell_size = float(value)
self._centroids = None
if self.on_file:
self.workspace.update_attribute(self, "attributes")

@property
def w_count(self) -> int:
Expand Down
2 changes: 1 addition & 1 deletion meta.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% set name = "geoh5py" %}
{% set version = "0.10.0" %}
{% set version = "0.10.1" %}

package:
name: {{ name|lower }}
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
name = "geoh5py"

version = "0.10.0"
version = "0.10.1"

license = "LGPL-3.0-or-later"
description = "Python API for geoh5, an open file format for geoscientific data"
Expand Down