Skip to content

Commit 0636ce5

Browse files
committed
dtype_from_numpy: Add long alias
1 parent 4143acb commit 0636ce5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

include/openPMD/binding/python/Numpy.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ inline Datatype dtype_from_numpy(pybind11::dtype const dt)
5858
return Datatype::INT;
5959
else if (dt.char_() == pybind11::dtype("int_").char_())
6060
return Datatype::LONG;
61+
else if (dt.char_() == pybind11::dtype("long").char_()) // alias used on
62+
// Win64
63+
return Datatype::LONG;
6164
else if (dt.char_() == pybind11::dtype("longlong").char_())
6265
return Datatype::LONGLONG;
6366
else if (dt.char_() == pybind11::dtype("ushort").char_())
@@ -66,6 +69,9 @@ inline Datatype dtype_from_numpy(pybind11::dtype const dt)
6669
return Datatype::UINT;
6770
else if (dt.char_() == pybind11::dtype("uint").char_())
6871
return Datatype::ULONG;
72+
else if (dt.char_() == pybind11::dtype("ulong").char_()) // alias used on
73+
// Win64
74+
return Datatype::ULONG;
6975
else if (dt.char_() == pybind11::dtype("ulonglong").char_())
7076
return Datatype::ULONGLONG;
7177
else if (dt.char_() == pybind11::dtype("clongdouble").char_())

0 commit comments

Comments
 (0)