10BC0 MAINT:interpolate: Flatten arrays to mimic legacy f2py behavior · scipy/scipy@0d981c3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0d981c3

Browse files
committed
MAINT:interpolate: Flatten arrays to mimic legacy f2py behavior
1 parent 7e3f41d commit 0d981c3

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

scipy/interpolate/_fitpack2.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,19 +63,23 @@ def _curfit(x, y, k, w=None, xb=None, xe=None, s=None, nest=None, iopt=0,
6363
For compatibility with old code, can be unpacked as:
6464
_data = (x, y, w, xb, xe, k, s, n, t, c, fp, None, None, ier)
6565
"""
66-
x = np.asarray(x, dtype=float)
67-
y = np.asarray(y, dtype=float)
66+
x = np.asarray(x, dtype=float, order='F').ravel('F')
67+
y = np.asarray(y, dtype=float, order='F').ravel('F')
6868
m = len(x)
6969

7070
if w is None:
7171
w = np.ones(m, dtype=float)
7272
else:
73-
w = np.asarray(w, dtype=float)
73+
w = np.asarray(w, dtype=float, order='F').ravel('F')
7474

7575
if xb is None:
76-
xb = x[0]
76+
xb = float(x[0])
77+
else:
78+
xb = float(xb)
7779
if xe is None:
78-
xe = x[-1]
80+
xe = float(x[-1])
81+
else:
82+
xe = float(xe)
7983
if s is None:
8084
s = float(m)
8185

0 commit comments

Comments
 (0)
0