MCPcopy
hub / github.com/pydata/xarray / result_type

Function result_type

xarray/tests/arrays.py:116–122  ·  view source on GitHub ↗

Called by xarray to ensure all arguments to concat have the same dtype.

(*arrays_and_dtypes)

Source from the content-addressed store, hash-verified

114
115@implements(np.result_type)
116def result_type(*arrays_and_dtypes) -> np.dtype:
117 """Called by xarray to ensure all arguments to concat have the same dtype."""
118 first_dtype, *other_dtypes = (np.dtype(obj) for obj in arrays_and_dtypes)
119 for other_dtype in other_dtypes:
120 if other_dtype != first_dtype:
121 raise ValueError("dtypes not all consistent")
122 return first_dtype
123
124
125@implements(np.broadcast_to)

Callers

nothing calls this directly

Calls 1

dtypeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…