fix deprecated type definition.

Original answer triggered `c:\conda\envs\bigdata\lib\site-packages\ipykernel_launcher.py:5: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.`
New answer proposed per [Numpy docs](https://numpy.org/doc/stable/reference/generated/numpy.dtype.html)
This commit is contained in:
Poedator 2020-09-27 11:24:31 +03:00 committed by GitHub
parent 56e31a9843
commit 81e21a1f2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -248,10 +248,10 @@ Create a custom dtype that describes a color as four unsigned bytes (RGBA) (★
hint: np.dtype
< a23
color = np.dtype([("r", np.ubyte, 1),
("g", np.ubyte, 1),
("b", np.ubyte, 1),
("a", np.ubyte, 1)])
color = np.dtype([("r", np.ubyte),
("g", np.ubyte),
("b", np.ubyte),
("a", np.ubyte)])
< q24
Multiply a 5x3 matrix by a 3x2 matrix (real matrix product) (★☆☆)