Closed Maarten-vd-Sande closed 4 years ago
Ah, let me add some tests!
edit: absolutely no clue how type-hinting tests work :angel:, should I add some? If so I would need some pointers
type-hinting tests are a big problem. I'm not really happy with how we're doing them, but I haven't found a better solution.
That said, something like this would be nice (in the numpy test file):
def test_unsigned() -> None:
x: np.ndarray[np.uint8] = np.array([3, 4], dtype=np.uint8)
y: np.ndarray[np.uint8] = x + x
z: np.ndarray[np.int32] = y
@thomkeh I added the tests. Thanks for the help :)
Great, thanks!
As mentioned briefly in #130, I added support for unsigned integers. When adding unsigned + unsigned -> unsigned, but unsigned + signed -> signed.
Now the still missing datatypes are: np.intp, np.uintp, np.complex64, np.complex128
But I am not entirely sure how to add them, and they are quite niche (even more so than unsigned ;) )