New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shape dimensions should only be int or float #299
Comments
@moorepants I don't think this behavior should be allowed. If you also feel the same, I can send a PR. |
We work somewhat on the "garbage in/garbage out" principal instead of having tons of type checks, but if you'd like to submit a PR with the type checks I will accept it. Thanks. |
@moorepants okay i think i'll pass. Can you please help me get started with some beginner friendly issues? |
This would be a good one to start with: #296 You have to run the examples and see which ones are using deprecated code. |
@moorepants thank you. I'll look into it. |
I think the existing PR fixes this but I can't check for a while.
|
@oliverlee yes, I think you have already sent a PR for this. |
@yashu-seth I just realized I won't have wifi for a while. so if you'd like to work on it, please do. You can take a look at the existing PR for a starting point. |
This solves Bug pydy#299. A simple check for the datatype.
Note that the shapes support sympy expressions as dimensions, so they shouldn't "only be int or float". I actually don't see any reason to make these specific type checks. Python code typically follows duck typing and I'm fine if we use the garbage in/garbage out philosophy here. You simply need to have clear docstrings that say what should be passed in. We don't have to have tons of type checks. |
The text was updated successfully, but these errors were encountered: