We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e4496fe commit 08c8f9aCopy full SHA for 08c8f9a
xarray/conventions.py
@@ -69,15 +69,6 @@ def _infer_dtype(array, name=None):
69
)
70
71
72
- native_dtypes = set(np.vectorize(type, otypes=[object])(array.ravel()))
73
- if len(native_dtypes) > 1 and native_dtypes != {bytes, str}:
74
- raise ValueError(
75
- "unable to infer dtype on variable {!r}; object array "
76
- "contains mixed native types: {}".format(
77
- name, ", ".join(x.__name__ for x in native_dtypes)
78
- )
79
80
-
81
element = array[(0,) * array.ndim]
82
# We use the base types to avoid subclasses of bytes and str (which might
83
# not play nice with e.g. hdf5 datatypes), such as those from numpy
0 commit comments