numpy.cpp
Go to the documentation of this file.
00001 // Copyright Jim Bosch 2010-2012.
00002 // Distributed under the Boost Software License, Version 1.0.
00003 //    (See accompanying file LICENSE_1_0.txt or copy at
00004 //          http://www.boost.org/LICENSE_1_0.txt)
00005 
00006 #define BOOST_NUMPY_INTERNAL_MAIN
00007 #include <boost/numpy/internal.hpp>
00008 #include <boost/numpy/dtype.hpp>
00009 
00010 namespace boost 
00011 {
00012 namespace numpy 
00013 {
00014 
00015 #if PY_MAJOR_VERSION == 2
00016 static void wrap_import_array() {
00017     import_array();
00018 }
00019 #else
00020 static void * wrap_import_array() {
00021     import_array();
00022 }
00023 #endif
00024 
00025 void initialize(bool register_scalar_converters) 
00026 {
00027   wrap_import_array();
00028   import_ufunc();
00029   if (register_scalar_converters)
00030         dtype::register_scalar_converters();
00031 }
00032 
00033 }
00034 }


boost_numpy
Author(s): Jim Bosch, Ankit Daftery
autogenerated on Fri Aug 28 2015 10:10:40