Skip to content

Addressed compatibility issue of OpenPNM with numpy 2.2 #2958

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion openpnm/_skgraph/queries/_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def find_connected_nodes(network, inds, flatten=True, logic='or'):
if len(inds):
temp = temp.astype(float)
temp[inds] = np.nan
temp = np.reshape(a=temp, newshape=[len(edges), 2], order='F')
temp = np.reshape(temp, [len(edges), 2], order='F')
neighbors = temp
else:
neighbors = [np.array([], dtype=np.int64) for i in range(len(edges))]
Expand Down
2 changes: 1 addition & 1 deletion openpnm/io/_pergeos.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
data = s[key].split('\n')[1:]
data = ' '.join(data)
arr = np.fromstring(data, dtype=typemap[key], sep=' ')
arr = np.reshape(arr, newshape=shapemap[key])
arr = np.reshape(arr, shapemap[key])

Check warning on line 178 in openpnm/io/_pergeos.py

View check run for this annotation

Codecov / codecov/patch

openpnm/io/_pergeos.py#L178

Added line #L178 was not covered by tests
net[propmap[key]] = arr
# End file parsing

Expand Down
Loading