-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into circuitpython9
- Loading branch information
Showing
12 changed files
with
354 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
try: | ||
from ulab import numpy as np | ||
except ImportError: | ||
import numpy as np | ||
|
||
dtypes = (np.uint8, np.int8, np.uint16, np.int16) | ||
|
||
for dtype_a in dtypes: | ||
a = np.array(range(5), dtype=dtype_a) | ||
for dtype_b in dtypes: | ||
b = np.array(range(250, 255), dtype=dtype_b) | ||
try: | ||
print('a & b: ', a & b) | ||
except Exception as e: | ||
print(e) | ||
|
||
b = np.array([False, True, False, True, False], dtype=np.bool) | ||
try: | ||
print('a & b (bool): ', a & b) | ||
except Exception as e: | ||
print(e) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
a & b: array([0, 1, 0, 1, 4], dtype=uint8) | ||
a & b: array([0, 1, 0, 1, 4], dtype=int16) | ||
a & b: array([0, 1, 0, 1, 4], dtype=uint16) | ||
a & b: array([0, 1, 0, 1, 4], dtype=int16) | ||
a & b (bool): array([0, 1, 0, 1, 0], dtype=uint8) | ||
a & b: array([0, 1, 0, 1, 4], dtype=int16) | ||
a & b: array([0, 1, 0, 1, 4], dtype=int8) | ||
a & b: array([0, 1, 0, 1, 4], dtype=int16) | ||
a & b: array([0, 1, 0, 1, 4], dtype=int16) | ||
a & b (bool): array([0, 1, 0, 1, 0], dtype=int16) | ||
a & b: array([0, 1, 0, 1, 4], dtype=uint16) | ||
a & b: array([0, 1, 0, 1, 4], dtype=int16) | ||
a & b: array([0, 1, 0, 1, 4], dtype=uint16) | ||
dtype of int32 is not supported | ||
a & b (bool): array([0, 1, 0, 1, 0], dtype=uint16) | ||
a & b: array([0, 1, 0, 1, 4], dtype=int16) | ||
a & b: array([0, 1, 0, 1, 4], dtype=int16) | ||
dtype of int32 is not supported | ||
a & b: array([0, 1, 0, 1, 4], dtype=int16) | ||
a & b (bool): array([0, 1, 0, 1, 0], dtype=int16) |
Oops, something went wrong.