-
Notifications
You must be signed in to change notification settings - Fork 311
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
Additional arithmetic operations/variants #697
Comments
To my surprise I also have to write |
hi, we can look at this if you provide example code for the problem or tell us the types of all the incoming variables |
I am not sure if this me not understanding Rust or if there are some variants missing in |
Thanks! You're probably right - the ones you ask about as missing are not listed in the docs as being present: https://docs.rs/ndarray/0.12.1/ndarray/struct.ArrayBase.html#arithmetic-operations I'm not sure all of these should exist. I know it seems silly to say it like that — but adding one rule might result in dozens of additional impl blocks per rule. Playground link for your example https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=b5f6f01f0151d31d305a89e657810925 |
Are you concerned about the amount of code that will get generated? |
Yes. Maybe there is a way to simplify it somehow. |
I do understand the bloat concern @bluss, but the error message you get from the compiler on this issue is particularly confusing compared to the simplicity of the operation you are trying to perform. I bumped into it myself while I was working on another example for I'd be happy to work on this to expand the list of admitted operands combinations if you are willing to merge it/consider to merge it. |
Let's make an issue to discuss this. There are loads of things that can be improved with the arithmetic ops. @LukeMathWalker Let me know what you think. I've tried to make it specific #699 |
@LukeMathWalker I can't promise I have the bandwidth to approve it. We need to merge changes that I haven't approved too, otherwise we'll be stuck here :) |
I guess what I meant was "unless you strongly feel against it" 👍 I'll contribute to the discussion in #699 |
Hello
i get an type mismatch error when in do
Edit: o_gate has the type
Array1<f32>
Error
i think it tries to do a scalar operation
When i don't try to do it inplace it works
We use inplace operations when concerned about the memory usage right?
The text was updated successfully, but these errors were encountered: