@@ -142,32 +142,32 @@ class BOOST_NUMPY_DECL ndarray : public object
142142/* *
143143 * @brief Construct a new array with the given shape and data type, with data initialized to zero.
144144 */
145- ndarray zeros (python::tuple const & shape, dtype const & dt);
146- ndarray zeros (int nd, Py_intptr_t const * shape, dtype const & dt);
145+ BOOST_NUMPY_DECL ndarray zeros (python::tuple const & shape, dtype const & dt);
146+ BOOST_NUMPY_DECL ndarray zeros (int nd, Py_intptr_t const * shape, dtype const & dt);
147147
148148/* *
149149 * @brief Construct a new array with the given shape and data type, with data left uninitialized.
150150 */
151- ndarray empty (python::tuple const & shape, dtype const & dt);
152- ndarray empty (int nd, Py_intptr_t const * shape, dtype const & dt);
151+ BOOST_NUMPY_DECL ndarray empty (python::tuple const & shape, dtype const & dt);
152+ BOOST_NUMPY_DECL ndarray empty (int nd, Py_intptr_t const * shape, dtype const & dt);
153153
154154/* *
155155 * @brief Construct a new array from an arbitrary Python sequence.
156156 *
157157 * @todo This does't seem to handle ndarray subtypes the same way that "numpy.array" does in Python.
158158 */
159- ndarray array (object const & obj);
160- ndarray array (object const & obj, dtype const & dt);
159+ BOOST_NUMPY_DECL ndarray array (object const & obj);
160+ BOOST_NUMPY_DECL ndarray array (object const & obj, dtype const & dt);
161161
162162namespace detail
163163{
164164
165- ndarray from_data_impl (void * data,
166- dtype const & dt,
167- std::vector<Py_intptr_t> const & shape,
168- std::vector<Py_intptr_t> const & strides,
169- object const & owner,
170- bool writeable);
165+ BOOST_NUMPY_DECL ndarray from_data_impl (void * data,
166+ dtype const & dt,
167+ std::vector<Py_intptr_t> const & shape,
168+ std::vector<Py_intptr_t> const & strides,
169+ object const & owner,
170+ bool writeable);
171171
172172template <typename Container>
173173ndarray from_data_impl (void * data,
@@ -183,12 +183,12 @@ ndarray from_data_impl(void * data,
183183 return from_data_impl (data, dt, shape_, strides_, owner, writeable);
184184}
185185
186- ndarray from_data_impl (void * data,
187- dtype const & dt,
188- object const & shape,
189- object const & strides,
190- object const & owner,
191- bool writeable);
186+ BOOST_NUMPY_DECL ndarray from_data_impl (void * data,
187+ dtype const & dt,
188+ object const & shape,
189+ object const & strides,
190+ object const & owner,
191+ bool writeable);
192192
193193} // namespace boost::python::numpy::detail
194194
@@ -250,39 +250,53 @@ inline ndarray from_data(void const * data,
250250 * @param[in] nd_max Maximum number of dimensions.
251251 * @param[in] flags Bitwise OR of flags specifying additional requirements.
252252 */
253- ndarray from_object (object const & obj, dtype const & dt,
254- int nd_min, int nd_max, ndarray::bitflag flags=ndarray::NONE);
255-
256- inline ndarray from_object (object const & obj, dtype const & dt,
257- int nd, ndarray::bitflag flags=ndarray::NONE)
253+ BOOST_NUMPY_DECL ndarray from_object (object const & obj,
254+ dtype const & dt,
255+ int nd_min,
256+ int nd_max,
257+ ndarray::bitflag flags=ndarray::NONE);
258+
259+ BOOST_NUMPY_DECL inline ndarray from_object (object const & obj,
260+ dtype const & dt,
261+ int nd,
262+ ndarray::bitflag flags=ndarray::NONE)
258263{
259264 return from_object (obj, dt, nd, nd, flags);
260265}
261266
262- inline ndarray from_object (object const & obj, dtype const & dt, ndarray::bitflag flags=ndarray::NONE)
267+ BOOST_NUMPY_DECL inline ndarray from_object (object const & obj,
268+ dtype const & dt,
269+ ndarray::bitflag flags=ndarray::NONE)
263270{
264271 return from_object (obj, dt, 0 , 0 , flags);
265272}
266273
267- ndarray from_object (object const & obj, int nd_min, int nd_max,
268- ndarray::bitflag flags=ndarray::NONE);
274+ BOOST_NUMPY_DECL ndarray from_object (object const & obj,
275+ int nd_min,
276+ int nd_max,
277+ ndarray::bitflag flags=ndarray::NONE);
269278
270- inline ndarray from_object (object const & obj, int nd, ndarray::bitflag flags=ndarray::NONE)
279+ BOOST_NUMPY_DECL inline ndarray from_object (object const & obj,
280+ int nd,
281+ ndarray::bitflag flags=ndarray::NONE)
271282{
272283 return from_object (obj, nd, nd, flags);
273284}
274285
275- inline ndarray from_object (object const & obj, ndarray::bitflag flags=ndarray::NONE)
286+ BOOST_NUMPY_DECL inline ndarray from_object (object const & obj,
287+ ndarray::bitflag flags=ndarray::NONE)
276288{
277289 return from_object (obj, 0 , 0 , flags);
278290}
279291
280- inline ndarray::bitflag operator |(ndarray::bitflag a, ndarray::bitflag b)
292+ BOOST_NUMPY_DECL inline ndarray::bitflag operator |(ndarray::bitflag a,
293+ ndarray::bitflag b)
281294{
282295 return ndarray::bitflag (int (a) | int (b));
283296}
284297
285- inline ndarray::bitflag operator &(ndarray::bitflag a, ndarray::bitflag b)
298+ BOOST_NUMPY_DECL inline ndarray::bitflag operator &(ndarray::bitflag a,
299+ ndarray::bitflag b)
286300{
287301 return ndarray::bitflag (int (a) & int (b));
288302}
0 commit comments