8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3be4490 commit 14d5266Copy full SHA for 14d5266
src/_path.h
@@ -1195,9 +1195,11 @@ struct _is_sorted
1195
1196
size = PyArray_DIM(array, 0);
1197
1198
+ // std::isnan is only in C++11, which we don't yet require,
1199
+ // so we use the the "self == self" trick
1200
for (i = 0; i < size; ++i) {
1201
last_value = *((T *)PyArray_GETPTR1(array, i));
- if (std::isfinite(last_value)) {
1202
+ if (last_value == last_value) {
1203
break;
1204
}
1205
@@ -1209,7 +1211,7 @@ struct _is_sorted
1209
1211
1210
1212
for (; i < size; ++i) {
1213
current_value = *((T *)PyArray_GETPTR1(array, i));
- if (std::isfinite(current_value)) {
1214
+ if (current_value == current_value) {
1215
if (current_value < last_value) {
1216
return false;
1217
0 commit comments