MCPcopy Create free account
hub / github.com/bterwijn/memory_graph / ndarray_to_node

Function ndarray_to_node

memory_graph/extension_numpy.py:11–18  ·  view source on GitHub ↗
(data, ndarray_data)

Source from the content-addressed store, hash-verified

9import memory_graph.config as config
10
11def ndarray_to_node(data, ndarray_data):
12 dim = len(ndarray_data.shape)
13 if dim > 2:
14 return Node_Linear(data, [i for i in ndarray_data])
15 elif dim == 2:
16 return Node_Table(data, ndarray_data)
17 else:
18 return Node_Linear(data, ndarray_data)
19
20def get_numpy_immutables():
21 import numpy as np

Callers 1

extend_numpyFunction · 0.85

Calls 2

Node_LinearClass · 0.90
Node_TableClass · 0.90

Tested by

no test coverage detected