Skip to content

Commit 31616f1

Browse files
committed
MAINT: interpolate: work around MSVC quirks: 1) ssize_t; 2) std::to_string
1 parent 39f8344 commit 31616f1

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

scipy/interpolate/src/__fitpack.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ data_matrix( /* inputs */
205205
the `s-1` corresponding rows form an `(s-1, k+1)`-sized "block".
206206
Then a blocked QR implementation could look like
207207
https://people.sc.fsu.edu/~jburkardt/f77_src/band_qr/band_qr.f
208+
208209
The `startrow` optional argument accounts for the scenatio with a two-step
209210
factorization. Namely, the preceding rows are assumend to be already
210211
processed and are skipped.
@@ -339,7 +340,7 @@ _split(ConstRealArray1D x, ConstRealArray1D t, int k, ConstRealArray1D residuals
339340
ssize_t nc = t.nelem - k - 1;
340341

341342
std::vector<ssize_t> ix;
342-
ix.push_back(0.0);
343+
ix.push_back(0);
343344

344345
std::vector<double> fparts;
345346
double fpart = 0.0;

scipy/interpolate/src/__fitpack.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
22
#include <iostream>
33
#include <tuple>
44
#include <vector>
5+
#include <string>
56

67
#include "../_build_utils/src/npy_cblas.h"
78
#include "../_build_utils/src/fortran_defs.h"
89

910
#define DLARTG BLAS_FUNC(dlartg)
1011

12+
/* MSVC */
13+
#define ssize_t ptrdiff_t
1114

1215
namespace fitpack {
1316

0 commit comments

Comments
 (0)