MCPcopy Create free account
hub / github.com/NSLS2/PyXRF / data_or_empty_array

Function data_or_empty_array

pyxrf/model/load_data_from_db.py:1850–1856  ·  view source on GitHub ↗

If data is a string, then return an empty array, otherwise return the data as numpy array.

(v)

Source from the content-addressed store, hash-verified

1848 raise RuntimeError(f"Matching event #{m} was not found in 'primary' stream")
1849
1850 def data_or_empty_array(v):
1851 """
1852 If data is a string, then return an empty array, otherwise return the data as numpy array.
1853 """
1854 if isinstance(v, str):
1855 v = []
1856 return np.asarray(v)
1857
1858 v, vp = doc, doc_p
1859 if "xs" in dets or "xs4" in dets:

Callers 1

map_data2D_srx_newFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected