Searched refs:shape (Results 1 - 20 of 20) sorted by relevance

/gem5/ext/pybind11/tests/
H A Dtest_buffers.py40 assert memoryview(mat).shape == (5, 4)
51 assert mat2.shape == (5, 4)
77 assert memoryview(matrix).shape == (5, 5)
78 assert np.asarray(matrix).shape == (5, 5)
H A Dtest_numpy_array.cpp125 l.append(r.shape(0));
126 l.append(r.shape(1));
161 sm.def("shape", [](const arr& a) { return arr(a.ndim(), a.shape()); });
162 sm.def("shape", [](const arr& a, ssize_t dim) { return a.shape(dim); });
191 // test numpy scalars (empty shape, ndim==0)
198 {a.shape(), a.shape() + a.ndim()},
284 for (ssize_t i = 0; i < r.shape(
[all...]
H A Dtest_numpy_array.py33 assert all(m.shape(a) == [])
36 m.shape(a, 0)
50 assert all(m.shape(a) == [2, 3])
51 assert m.shape(a, 0) == 2
52 assert m.shape(a, 1) == 3
57 m.shape(a, 2)
156 # empty shape means numpy scalar, PEP 3118
158 assert m.scalar_int().shape == ()
169 assert a.shape == b.shape
[all...]
H A Dtest_numpy_dtypes.cpp183 std::vector<ssize_t> shape { 3, 2 };
192 py::buffer_info buf_ndim2(vptr, 4, "i", 2, shape, strides);
193 py::buffer_info buf_ndim2_null(nullptr, 4, "i", 2, shape, strides);
202 // shape: (3, 2)
203 case 10: return arr_t(shape, strides, ptr);
204 case 11: return py::array(shape, strides, ptr);
205 case 12: return py::array(dtype, shape, strides, vptr);
206 case 13: return arr_t(shape, ptr);
207 case 14: return py::array(shape, ptr);
208 case 15: return py::array(dtype, shape, vpt
[all...]
H A Dtest_numpy_vectorize.cpp85 std::vector<ssize_t> shape;
87 return py::detail::broadcast(buffers, ndim, shape);
H A Dtest_numpy_vectorize.py193 assert z.shape == (1, )
196 assert z.shape == (1, 1, 1)
H A Dtest_buffers.cpp86 auto v = new Matrix(info.shape[0], info.shape[1]);
H A Dtest_eigen.py61 # TypeError should be raise for a shape mismatch
327 np.testing.assert_array_equal(a_corn1, master[0::master.shape[0] - 1, 0::master.shape[1] - 1])
328 np.testing.assert_array_equal(a_corn2, master[0::master.shape[0] - 1, 0::master.shape[1] - 1])
583 a = np.full(shape=10, fill_value=8, dtype=np.int8)
/gem5/ext/pybind11/include/pybind11/
H A Dnumpy.h34 and dimension types (e.g. shape, strides, indexing), instead of inflicting this
283 static void append_extents(list& /* shape */) { }
295 // appends the extents to shape
296 static void append_extents(list& shape) { argument
297 shape.append(N);
298 array_info<T>::append_extents(shape);
342 // Storing the shape & strides in local variables (i.e. these arrays) allows the compiler to
351 unchecked_reference(const void *data, const ssize_t *shape, const ssize_t *strides, enable_if_t<!Dyn, ssize_t>)
354 shape_[i] = shape[i];
360 unchecked_reference(const void *data, const ssize_t *shape, cons
[all...]
H A Dbuffer_info.h23 std::vector<ssize_t> shape; // Shape of the tensor (1 entry per dimension) member in struct:buffer_info
31 shape(std::move(shape_in)), strides(std::move(strides_in)) {
32 if (ndim != (ssize_t) shape.size() || ndim != (ssize_t) strides.size())
33 pybind11_fail("buffer_info: ndim doesn't match shape and/or strides length");
35 size *= shape[i];
51 {view->shape, view->shape + view->ndim}, {view->strides, view->strides + view->ndim}) {
69 shape = std::move(rhs.shape);
H A Deigen.h152 np_rows = a.shape(0),
153 np_cols = a.shape(1),
164 const EigenIndex n = a.shape(0),
567 auto shape = pybind11::tuple((pybind11::object) obj.attr("shape")); local
574 shape[0].cast<Index>(), shape[1].cast<Index>(), nnz,
H A Dstl_bind.h394 vec->reserve((size_t) info.shape[0]);
397 T *end = p + info.shape[0] * step;
H A Dpytypes.h1331 // Py_buffer uses signed sizes, strides and shape!..
1343 py_shape.push_back(info.shape[i]);
1346 buf.shape = py_shape.data();
/gem5/util/stats/
H A Dbarchart.py32 from matplotlib.numerix import array, arange, reshape, shape, transpose, zeros
70 dim = len(shape(data))
104 dim = len(shape(err))
155 dim = len(shape(self.inputdata))
156 cshape = shape(self.chartdata)
157 if self.charterr is not None and shape(self.charterr) != cshape:
274 dim = len(data.shape)
309 # generate a data matrix of the given shape
H A Doutput.py156 dim = len(data.shape)
157 x = data.shape[0]
159 y = data.shape[1]
/gem5/src/python/m5/util/
H A Ddot_writer_ruby.py55 shape = "Mrecord", \
68 shape = "Mrecord", \
H A Ddot_writer.py163 shape = "Mrecord", \
177 shape = "Mrecord", \
284 shape = "Mrecord", \
/gem5/util/minorview/
H A Dblobs.py209 self.shape = 'box'
328 # Draw the outline shape
337 if self.shape == 'box':
339 elif self.shape == 'openBottom':
341 elif self.shape == 'fifo':
H A Dmodel.py997 ret.shape = pairs.get('shape', 'box')
/gem5/ext/pybind11/include/pybind11/detail/
H A Dclass.h486 for (auto s : info->shape)
493 view->shape = &info->shape[0];

Completed in 45 milliseconds