2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-26 18:52:26 +00:00

Add astype to ndarray.

This commit is contained in:
Aaron Wishnick
2013-01-11 15:16:29 -05:00
parent 49b536fbd3
commit 4b99e6b83f
3 changed files with 16 additions and 0 deletions

View File

@@ -146,6 +146,12 @@ ndarray ndarray::view(dtype const & dt) const
return ndarray(python::detail::new_reference
(PyObject_CallMethod(this->ptr(), const_cast<char*>("view"), const_cast<char*>("O"), dt.ptr())));
}
ndarray ndarray::astype(dtype const & dt) const
{
return ndarray(python::detail::new_reference
(PyObject_CallMethod(this->ptr(), const_cast<char*>("astype"), const_cast<char*>("O"), dt.ptr())));
}
ndarray ndarray::copy() const
{