| 240 | |
| 241 | template <typename T> |
| 242 | void 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 |