MCPcopy Create free account
hub / github.com/ml-explore/mlx-data / data

Method data

mlx/data/Array.h:74–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72
73 template <class T>
74 T* data() const {
75 if (type_ != to_array_type<T>()) {
76 throw std::runtime_error("Array: incompatible array type");
77 }
78 return reinterpret_cast<T*>(data_.get());
79 };
80
81 template <class T>
82 T scalar() const {

Callers 2

ArrayMethod · 0.45
applyFunction · 0.45

Calls 1

getMethod · 0.45

Tested by

no test coverage detected