Skip to content

Remove restrictions on operations; Numpy already has them built in#1

Open
298A-E9E3 wants to merge 1 commit into
ikz87:masterfrom
298A-E9E3:master
Open

Remove restrictions on operations; Numpy already has them built in#1
298A-E9E3 wants to merge 1 commit into
ikz87:masterfrom
298A-E9E3:master

Conversation

@298A-E9E3

Copy link
Copy Markdown

This will allow for all operations to function on scalars and vectors

This will allow for all operations to function on scalars and vectors
@ikz87

ikz87 commented Mar 27, 2026

Copy link
Copy Markdown
Owner

I'd prefer the error handling to be at the level of the library itself. NumPy would show ValueError: operands could not be broadcast together with shapes (2,) (3,) which might not be good devex. I guess the double checking on vector sizes could be avoided, but at least a try/catch block should be added to change the error message coming from NumPy to something like ValueError("Vectors must have the same size")

The checks using the unions are a bit less verbose but would crash on python versions 3.6 to 3.9, I'd rather have the compatibility.

The addition of toList() is actually desirable.

Apply those changes and I'd gladly merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants