Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yokaze/pyscience11
C++11 wrapper for NumPy, SciPy and Matplotlib using pybind11
https://github.com/yokaze/pyscience11
matplotlib numpy pybind11 python scipy
Last synced: 2 months ago
JSON representation
C++11 wrapper for NumPy, SciPy and Matplotlib using pybind11
- Host: GitHub
- URL: https://github.com/yokaze/pyscience11
- Owner: yokaze
- License: mit
- Created: 2018-04-07T00:35:24.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-09-14T10:52:08.000Z (over 6 years ago)
- Last Synced: 2024-09-29T00:22:14.018Z (3 months ago)
- Topics: matplotlib, numpy, pybind11, python, scipy
- Language: C++
- Homepage:
- Size: 37.1 KB
- Stars: 20
- Watchers: 2
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Overview
pyscience11 is a C++11 wrapper for NumPy, SciPy and Matplotlib, that provides lightspeed access to their functionality.```cpp
#include
#include
#include
#include
#include
#includenamespace py = pybind11;
namespace m11 = matplotlib11;
namespace n11 = numpy11;
namespace s11 = scipy11;int main(void)
{
py::scoped_interpreter interpreter;auto numpy = n11::import_numpy();
auto scipy_special = s11::scipy::import_special();
auto x = numpy.linspace(-2, 2, 1001, py::arg("dtype") = numpy.attr("float32"));
auto y = scipy_special.erf(x);auto matplotlib = m11::import_matplotlib();
matplotlib.use("TkAgg");auto pl = m11::matplotlib::import_pyplot();
pl.plot(x, y);
pl.show();return 0;
}
```# Install
This library is header-only, therefore nothing needs to be installed.Following command could be helpful to place headers into system directory.
```shell
pip install pyscience11
```# Requirements
- [pybind11](https://github.com/pybind/pybind11)# Contact
If you have any question about the library, feel free to contact me: https://github.com/yokaze