![]() The documentation will give you a flavor for how it works, but honestly, I didn't fully understand how to use it until reading this answer and just playing around with it on my own. If you want overkill, you can use numpy.einsum. The class may be removed in the future.Īs noted below, if using python3.5+ the operator works as you'd expect: > print(a b) It is no longer recommended to use this class, even for linear algebra. See the note in its documentation (reproduced below): Note that while you can use numpy.matrix (as of early 2021) where * will be treated like standard matrix multiplication, numpy.matrix is deprecated and may be removed in future releases. ![]() ![]() This occurs because numpy arrays are not matrices, and the standard operations *, +, -, / work element-wise on arrays.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |