ability to prevent force casts in numpy arguments

This commit is contained in:
Wenzel Jakob
2016-05-19 16:02:09 +02:00
parent 93a317eca1
commit b47a9de035
5 changed files with 28 additions and 13 deletions

View File

@@ -27,3 +27,8 @@ for f in [vectorized_func, vectorized_func2]:
print(f(np.array([[1, 2, 3], [4, 5, 6]]), np.array([[2], [3]]), 2))
print(np.array([[1, 2, 3], [4, 5, 6]])* np.array([[2], [3]])* 2)
from example import selective_func
selective_func(np.array([1], dtype=np.int32))
selective_func(np.array([1.0], dtype=np.float32))
selective_func(np.array([1.0j], dtype=np.complex64))