Add dtype_of<T>() function, update the tests

This commit is contained in:
Ivan Smirnov
2016-06-22 01:07:20 +01:00
parent 036e8cd32f
commit 4f164217e4
4 changed files with 39 additions and 20 deletions

View File

@@ -169,6 +169,11 @@ template <typename T> struct format_descriptor
}
};
template <typename T>
object dtype_of() {
return detail::npy_format_descriptor<T>::descr();
}
NAMESPACE_BEGIN(detail)
template <typename T> struct npy_format_descriptor<T, typename std::enable_if<std::is_integral<T>::value>::type> {