MCPcopy Create free account
hub / github.com/ahalev/python-microgrid / add_numpy_pandas_representers

Function add_numpy_pandas_representers

src/pymgrid/utils/serialize.py:55–59  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

53
54
55def add_numpy_pandas_representers():
56 yaml.SafeDumper.add_representer(pd.DataFrame, _pandas_df_representer)
57 yaml.SafeDumper.add_multi_representer(np.ndarray, _numpy_arr_representer)
58 yaml.SafeDumper.add_multi_representer(np.floating, _numpy_represent_floating)
59 yaml.SafeDumper.add_multi_representer(np.integer, _numpy_represent_int)
60
61
62def add_numpy_pandas_constructors():

Callers 3

to_yamlMethod · 0.90
to_yamlMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected