Skip to content
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

np.bool deprecated #91

Open
ChrisBarker-NOAA opened this issue Jun 29, 2023 · 5 comments
Open

np.bool deprecated #91

ChrisBarker-NOAA opened this issue Jun 29, 2023 · 5 comments

Comments

@ChrisBarker-NOAA
Copy link
Contributor

extract_model does not work with numpy >= 1.24

File ... lib\site-packages\extract_model\grids\triangular_mesh.py:386, in UnstructuredGridSubset._get_intersecting_mask(self, x, y, element, bbox)
    384 """Return a mask for the region subsetted by bbox."""
    385 # The mask that will represent only valid elements
--> 386 mask = np.ones((element.shape[0]), dtype=np.bool)
    388 self._mask_disjoint_triangles(x, y, element, bbox, mask)
    389 submask, _ = self._mask_triangles_with_no_points_in_box(
    390     x, y, element, bbox, mask
    391 )
@kthyng
Copy link
Member

kthyng commented Jun 29, 2023

I think this is covered already?

numpy <1.24

@ChrisBarker-NOAA
Copy link
Contributor Author

did that make it into the conda package? we've had failures.

But we really should get that fixed -- it's an easy change, and pinning numpy can have repercussions ...

-CHB

@ChrisBarker-NOAA
Copy link
Contributor Author

I jsut looked at the conda-forge recipe, and it is pinned -- no not sure how we got this incompatibility in an environment.

But still good to address this sooner than later.

@ChrisBarker-NOAA
Copy link
Contributor Author

Now I"m really confused -- I msut have had a brain blip -- you fixed this in January:

85246cf1 (Kristen Thyng 2023-01-23 13:06:05 -0600 386)         mask = np.ones((element.shape[0]), dtype=bool)

So does it need to be pinned anymore? ( lat release Jan 27 -- so the fix should be in there, yes?)

(we must have been working with an old version -- though not sure how that happened)

I'm not going to close this, 'cause you may be able to unpin numpy.

@kthyng
Copy link
Member

kthyng commented Jun 30, 2023

Hm that is indeed confusing. My concern about unpinning is I recall the numpy version being an issue for several packages but I can't quite remember the details to know if it was as simple as this or more involved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants