Improve py::array_t scalar type information (#724)

* Add value_type member alias to py::array_t (resolve #632)

* Use numpy scalar name in py::array_t function signatures (e.g. float32/64 instead of just float)
This commit is contained in:
Dean Moldovan
2017-03-13 19:17:18 +01:00
committed by GitHub
parent dc5ce5930f
commit 16afbcef46
4 changed files with 25 additions and 5 deletions

View File

@@ -71,5 +71,5 @@ def test_docs(doc):
from pybind11_tests import vectorized_func
assert doc(vectorized_func) == """
vectorized_func(arg0: numpy.ndarray[int], arg1: numpy.ndarray[float], arg2: numpy.ndarray[float]) -> object
vectorized_func(arg0: numpy.ndarray[int32], arg1: numpy.ndarray[float32], arg2: numpy.ndarray[float64]) -> object
""" # noqa: E501 line too long