Go to the documentation of this file.00001
00002
00003
00004
00005
00006 #define BOOST_NUMPY_INTERNAL
00007 #include <boost/numpy/internal.hpp>
00008
00009 namespace boost
00010 {
00011 namespace python
00012 {
00013 namespace converter
00014 {
00015 NUMPY_OBJECT_MANAGER_TRAITS_IMPL(PyVoidArrType_Type, numpy::void_)
00016 }
00017 }
00018
00019 namespace numpy
00020 {
00021
00022 void_::void_(Py_ssize_t size)
00023 : object(python::detail::new_reference
00024 (PyObject_CallFunction((PyObject*)&PyVoidArrType_Type, const_cast<char*>("i"), size)))
00025 {}
00026
00027 void_ void_::view(dtype const & dt) const
00028 {
00029 return void_(python::detail::new_reference
00030 (PyObject_CallMethod(this->ptr(), const_cast<char*>("view"), const_cast<char*>("O"), dt.ptr())));
00031 }
00032
00033 void_ void_::copy() const
00034 {
00035 return void_(python::detail::new_reference
00036 (PyObject_CallMethod(this->ptr(), const_cast<char*>("copy"), const_cast<char*>(""))));
00037 }
00038
00039 }
00040 }