Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r73611 - sandbox/numpy/libs/numpy/doc
From: ankitdaf_at_[hidden]
Date: 2011-08-08 13:05:09


Author: ankitdaf
Date: 2011-08-08 13:05:09 EDT (Mon, 08 Aug 2011)
New Revision: 73611
URL: http://svn.boost.org/trac/boost/changeset/73611

Log:
Added a line for zeros
Text files modified:
   sandbox/numpy/libs/numpy/doc/tutorial.rst | 4 ++++
   1 files changed, 4 insertions(+), 0 deletions(-)

Modified: sandbox/numpy/libs/numpy/doc/tutorial.rst
==============================================================================
--- sandbox/numpy/libs/numpy/doc/tutorial.rst (original)
+++ sandbox/numpy/libs/numpy/doc/tutorial.rst 2011-08-08 13:05:09 EDT (Mon, 08 Aug 2011)
@@ -25,6 +25,10 @@
           np::dtype dtype = np::dtype::get_builtin<float>();
           np::ndarray a = np::zeros(shape, dtype);
 
+You can also create an empty array like this ::
+
+ np::ndarray b = np::empty(shape,dtype);
+
 Print the original and reshaped array. The array a which is a list is first converted to a string, and each value in the list is extracted using extract< >::
 
           std::cout << "Original array:\n" << p::extract<char const *>(p::str(a)) << std::endl;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk