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

Function print_array

mlx/utils.cpp:242–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

240
241template <typename T>
242void print_array(std::ostream& os, const array& a) {
243 os << std::boolalpha;
244 os << "array(";
245 if (a.ndim() == 0) {
246 auto data = a.data<T>();
247 get_global_formatter().print(os, data[0]);
248 } else {
249 print_subarray<T>(os, a, 0, 0);
250 }
251 os << ", dtype=" << a.dtype() << ")";
252 os << std::noboolalpha;
253}
254
255} // namespace
256

Callers

nothing calls this directly

Calls 1

printMethod · 0.80

Tested by

no test coverage detected