Skip to content

Commit

Permalink
removing use of array.ptp()
Browse files Browse the repository at this point in the history
  • Loading branch information
jgostick committed Aug 7, 2024
1 parent ed414e7 commit 3ab7b13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openpnm/visualization/_plottools.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ def plot_tutorial(network,
fig = plt.gcf()
fig.tight_layout()
dims = op.topotools.dimensionality(network)
xy_range = network.coords.ptp(axis=0)[dims]
xy_range = np.ptp(network.coords, axis=0)[dims]
aspect_ratio = xy_range[0] / xy_range[1]
fig.set_size_inches(5, 5 / aspect_ratio)

Expand Down Expand Up @@ -781,7 +781,7 @@ def _generate_voxel_image(network, pore_shape, throat_shape, max_dim=200):
# Transform points to satisfy origin at (0, 0, 0)
xyz0 = xyz.min(axis=0) - delta
xyz += -xyz0
res = (xyz.ptp(axis=0).max() + 2 * delta) / max_dim
res = (np.ptp(xyz, axis=0).max() + 2 * delta) / max_dim
shape = np.rint((xyz.max(axis=0) + delta) / res).astype(int) + 2 * extra_clearance

# Transforming from real coords to matrix coords
Expand Down

0 comments on commit 3ab7b13

Please sign in to comment.