Closed larsoner closed 2 years ago
I have a feeling oldest-supported-numpy
might work for us here (somehow), but I'm just bumping the requirements_build.txt
here hoping things come back green
Finally green!
@pyvista/developers this one is ready for review. It would be nice to merge this so that we could get 3.10 wheels on PyPi
... I went a step further and just called ascontiguousarray
with a dtype
, as it should essentially be a no-op / just create a view if it's already contiguous, e.g.:
>>> import numpy as np
>>> x = np.array([1.], np.float64)
>>> y = np.ascontiguousarray(x, dtype=np.float64)
>>> y[0] = 0
>>> x
array([0.])
I also fixed some plain assert
statements to raise a proper error, and changed to bare raise Exception
s to raise RuntimeError
s
... I went a step further and just called ascontiguousarray with a dtype, as it should essentially be a no-op / just create a view if it's already contiguous, e.g.:
Yeah, that's what I had in mind.
I also fixed some plain
assert
statements to raise a proper error, and changed to bareraise Exceptions
toraise RuntimeErrors
Good idea, thanks. I wonder if we should define some more meaningful errors for these... not sure it's worth it for purity's sake.
Good idea, thanks. I wonder if we should define some more meaningful errors for these... not sure it's worth it for purity's sake.
Seems like overkill. I doubt users will hit these very often... but moving to a more specific builtin error type seemed like a minimal amount of effort required to make it slightly better here.
All green again, okay to merge @adeak ?
Sorry, @larsoner, I can't review any of the CI changes :( The numpy part seems good to me.
I think the CI stuff is necessary to get 3.10 support. If anyone else wants to look and finds problems, I'm happy to open another PR, or revert and try again! But in the meantime I'll go ahead and merge and cut a release to see if PyPi wheels show up.
np.float
is just an alias forfloat
so avoid the deprecation warning about it.manylinux2014
for Python3.10 supportwheels.pyvistia.org
)FYI it would be good to merge this and cut a release since there are no Python 3.10 wheels for
pymeshfix
.