Skip to content

Commit f55ab1b

Browse files
authored
Merge pull request numpy#21372 from seberg/relax-legacycast-parametric
BUG: Allow legacy dtypes to cast to datetime again
2 parents a5ae250 + a9ebf19 commit f55ab1b

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

numpy/core/src/multiarray/convert_datatype.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,6 @@ PyArray_GetCastingImpl(PyArray_DTypeMeta *from, PyArray_DTypeMeta *to)
107107
return NULL;
108108
}
109109
else {
110-
if (NPY_DT_is_parametric(from) || NPY_DT_is_parametric(to)) {
111-
Py_RETURN_NONE;
112-
}
113110
/* Reject non-legacy dtypes (they need to use the new API) */
114111
if (!NPY_DT_is_legacy(from) || !NPY_DT_is_legacy(to)) {
115112
Py_RETURN_NONE;

0 commit comments

Comments
 (0)