| 58 | } |
| 59 | |
| 60 | array array::unsafe_weak_copy(const array& other) { |
| 61 | auto cpy = array(other.shape(), other.dtype(), nullptr, {}); |
| 62 | cpy.set_data( |
| 63 | other.buffer(), |
| 64 | other.data_size(), |
| 65 | other.strides(), |
| 66 | other.flags(), |
| 67 | [](auto) {}); |
| 68 | cpy.array_desc_->offset = other.array_desc_->offset; |
| 69 | return cpy; |
| 70 | } |
| 71 | |
| 72 | array::array(std::initializer_list<float> data) |
| 73 | : array_desc_( |