We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
tensor<int> + <float> fails
>>> import dnnc as dc >>> a=dc.arange(5).asTypeInt() >>> a [0 1 2 3 4] >>> b=a+1 >>> b [1 2 3 4 5] >>> b=a+1.0 Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: unsupported operand type(s) for +: 'dnnc.iTensor' and 'float'
whereas, tensor<float> + <int> and tensor<float> + <float> WORKS
>>> import dnnc as dc >>> a=dc.arange(5) >>> a [0.000000 1.000000 2.000000 3.000000 4.000000] >>> b=a+1 >>> b [1.000000 2.000000 3.000000 4.000000 5.000000] >>> b=a+1.0 >>> b [1.000000 2.000000 3.000000 4.000000 5.000000]
The text was updated successfully, but these errors were encountered:
BUG script for types bool, int, float tensor and scalar operations.
import dnnc as dc b1 = dc.arange(10, 5).asTypeBool(); b2 = dc.arange(10, 5).asTypeBool(); i1 = dc.arange(5).asTypeInt(); i2 = dc.arange(5).asTypeInt(); f1 = dc.arange(5); f2 = dc.arange(5); # all of these operators fail. print(b1+b2) print(i1+i2) print(f1+f2) print(b1+i1) print(b1+f1) print(i1+b1) print(i1+f1) print(f1+b1) print(f1+i1) print(b1+False) print(b1+1) print(b1+1.0) print(i1+False) print(i1+1) print(i1+1.0) print(f1+False) print(f1+1) print(f1+1.0) print(True+b1) print(True+i1) print(True+f1) print(1+b1) print(1+i1) print(1+f1) print(1.0+b1) print(1.0+i1) print(1.0+f1)
Sorry, something went wrong.
b9f29ae
Merge pull request #94 from Gunjan933/master
95558a0
Full numpy binary support, fixed #33, fixed #50, fixed #70
srohit0
gunjannandy
No branches or pull requests
tensor<int> + <float> fails
whereas, tensor<float> + <int> and tensor<float> + <float> WORKS
The text was updated successfully, but these errors were encountered: