Replies: 2 comments 1 reply
-
You might be interested in checking out my Tensor implementation! |
Beta Was this translation helpful? Give feedback.
0 replies
-
@survuvi Why not use the After create the structure like in the documentation you can use it in this way: var C = Matrix(3, 3)
for i in range(C.rows):
for j in range(C.cols):
print(C[i,j]) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Like to python code below:
I'm trying to write a matrix in native mojo with dynamic vector without numpy:
_error: Expression [10]:12:29: invalid call to 'push_back': method argument #0 cannot be converted from 'DynamicVector[Int]' to 'Int'
matrix.push_back(row)
~~~~~~~~~~~~~~~~^~~~~
/.modular/Kernels/mojo/Stdlib/Vector.mojo:401:5: function declared here
fn push_back(inout self, value: type):
^
error: Expression [10]:13:12: cannot implicitly convert 'DynamicVector[Int]' value to 'object' in return value
return matrix_
Beta Was this translation helpful? Give feedback.
All reactions