MCPcopy Index your code
hub / github.com/pydata/xarray / cast_to_int_if_safe

Function cast_to_int_if_safe

xarray/coding/times.py:1003–1007  ·  view source on GitHub ↗
(num)

Source from the content-addressed store, hash-verified

1001
1002
1003def cast_to_int_if_safe(num) -> np.ndarray:
1004 int_num = np.asarray(num, dtype=np.int64)
1005 if array_all(num == int_num):
1006 num = int_num
1007 return num
1008
1009
1010def _division(deltas, delta, floor):

Callers 1

Calls 1

array_allFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…