LvArray
python.hpp
Go to the documentation of this file.
1 /*
2  *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3  * Copyright (c) 2019, Lawrence Livermore National Security, LLC.
4  *
5  * Produced at the Lawrence Livermore National Laboratory
6  *
7  * LLNL-CODE-746361
8  *
9  * All rights reserved. See COPYRIGHT for details.
10  *
11  * This file is part of the GEOSX Simulation Framework.
12  *
13  * GEOSX is a free software; you can redistribute it and/or modify it under
14  * the terms of the GNU Lesser General Public License (as published by the
15  * Free Software Foundation) version 2.1 dated February 1999.
16  *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
17  */
18 
24 #pragma once
25 
26 // source includes
27 #include "PyArray.hpp"
28 #include "PySortedArray.hpp"
29 #include "PyArrayOfArrays.hpp"
30 #include "PyArrayOfSets.hpp"
31 #include "PyCRSMatrix.hpp"
32 #include "PyFunc.hpp"
33 #include "../typeManipulation.hpp"
34 
35 namespace LvArray
36 {
37 
41 namespace python
42 {
43 
53 bool addPyLvArrayModule( PyObject * module );
54 
59 IS_VALID_EXPRESSION( CanCreate, T, LvArray::python::create( std::declval< T & >() ) );
60 
61 } // namespace python
62 } // namespace LvArray
std::enable_if_t< internal::canExportToNumpy< T >, PyObject *> create(T &value)
Create a NumPy 1D array of length 1 containing the scalar value.
Definition: numpyHelpers.hpp:147
IS_VALID_EXPRESSION(CanCreate, T, LvArray::python::create(std::declval< T & >()))
Expands to a static constexpr template bool.
The top level namespace.
Definition: Array.hpp:24
bool addPyLvArrayModule(PyObject *module)
add the pylvarray module, which defines all of the pylvarray classes, to a module.