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

Function _normalize_filename_or_obj

xarray/backends/scipy_.py:366–372  ·  view source on GitHub ↗
(
    filename_or_obj: T_PathFileOrDataStore,
)

Source from the content-addressed store, hash-verified

364
365
366def _normalize_filename_or_obj(
367 filename_or_obj: T_PathFileOrDataStore,
368) -> str | ReadBuffer | AbstractDataStore:
369 if isinstance(filename_or_obj, bytes | memoryview):
370 return io.BytesIO(filename_or_obj)
371 else:
372 return _normalize_path(filename_or_obj)
373
374
375class ScipyBackendEntrypoint(BackendEntrypoint):

Callers 2

guess_can_openMethod · 0.70
open_datasetMethod · 0.70

Calls 1

_normalize_pathFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…