| 1236 | */ |
| 1237 | template <typename T, ssize_t Dims = -1> |
| 1238 | detail::unchecked_mutable_reference<T, Dims> mutable_unchecked() & { |
| 1239 | if (Dims >= 0 && ndim() != Dims) { |
| 1240 | throw std::domain_error("array has incorrect number of dimensions: " |
| 1241 | + std::to_string(ndim()) + "; expected " |
| 1242 | + std::to_string(Dims)); |
| 1243 | } |
| 1244 | return detail::unchecked_mutable_reference<T, Dims>( |
| 1245 | mutable_data(), shape(), strides(), ndim()); |
| 1246 | } |
| 1247 | |
| 1248 | /** |
| 1249 | * Returns a proxy object that provides const access to the array's data without bounds or |