Skip to content

Commit

Permalink
Numpy 1.x backwards-compatibility fix
Browse files Browse the repository at this point in the history
Before Numpy 2.0, `numpy.asarray()` does not support a `copy` keyword.

Partially reverts (one line of) cd9026f.

Fixes #35.
  • Loading branch information
musicinmybrain authored and has2k1 committed Jun 25, 2024
1 parent 5734ea8 commit 6b6ef5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion skmisc/loess/src/_loess.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ cdef class loess_prediction:
self.allocated = False

# Note : we need a copy as we may have to normalize
p_ndr = np.asarray(newdata, copy=True, order='C')
p_ndr = np.array(newdata, copy=True, subok=True, order='C')
p_ndr = p_ndr.astype(float)

# Dimensions should match those of the input
Expand Down

0 comments on commit 6b6ef5d

Please sign in to comment.