Closed MuellerSeb closed 4 months ago
A lot of the tests fail because of emcee and this issue: https://github.com/dfm/emcee/issues/509
Other errors have a problem with these lines in estimator.pyx
:
cdef long[:, :] counts = np.zeros((d_max, len(bin_edges)-1), dtype=long)
cdef long[:] counts = np.zeros(len(bin_edges)-1, dtype=long)
cdef long[:] counts = np.zeros(k_max, dtype=long)
cdef long[:] counts = np.zeros(k_max, dtype=long)
and raise
E ValueError: Buffer dtype mismatch, expected 'long' but got 'long long'
This only occurs on windows and is related to this: https://numpy.org/devdocs/numpy_2_0_migration_guide.html#windows-default-integer
One other category of errors is:
If using `np.array(obj, copy=False)` replace it with `np.asarray(obj)` to allow a copy when needed (no behavior change in NumPy 1.x).
np.array(..., copy=False)
is used in krige/base.py, 3 times in variogram/variogram.py and 3 times in tools/geometric.py
In order to mimic the ndmin=...
feature, we could replace these with e.g.:
pos = np.atleast_2d(np.asarray(pos, dtype=np.double))
All issues fixed. Only remaining issues should be solved upstream in emcee with: https://github.com/dfm/emcee/pull/510
Closes: #337 #345
Numpy 2.0.0rc1 was released: https://pypi.org/project/numpy/2.0.0c1 and is officially usable to build extensions.
np.asarray
everywhere withnp.atleast_(n)d
Additional doc fixes
32bit builds were removed with this PR. I think we can happily drop that.