zverianskii
zverianskii
MModular
Created by exographicskip on 1/6/2024 in #questions
Python.import_module not working as expected
input is not a module, try this one:
let builtins = Python.import_module('builtins')
return str(builtins.input("What is your name? "))
let builtins = Python.import_module('builtins')
return str(builtins.input("What is your name? "))
5 replies
MModular
Created by taalhaataahir01022001 on 1/5/2024 in #questions
How to convert a byte to integer?
@taalhaataahir01022001 you can use something similar to https://github.com/zverianskii/mojosiphash/blob/main/siphash.mojo#L66C39-L66C39
4 replies
MModular
Created by Harambe on 12/28/2023 in #questions
Can someone help me with this error please
Are you sure function name copyiNNit is the one that you wanted?
3 replies
MModular
Created by zverianskii on 9/22/2023 in #questions
Any examples of algorithm.reduction.argmax usage?
Thanks, @Jack Clayton . So, does this function only return a single element? The documentation says it "Finds the indices of the maximum element along the specified axis." I was actually expecting it to return multiple indices if there are repeated elements, which is why I'm interested in this function.
7 replies
MModular
Created by zverianskii on 9/22/2023 in #questions
Any examples of algorithm.reduction.argmax usage?
hi @Jack Clayton no new so far?
7 replies
MModular
Created by zverianskii on 9/22/2023 in #questions
Any examples of algorithm.reduction.argmax usage?
@Jack Clayton hi, any help here? I have spent a week trying to find a way to use SIMD for tasks like argwhere(
7 replies
MModular
Created by zverianskii on 9/14/2023 in #questions
string chars to uint8
Thanks @Jack Clayton could you please provide some info why _ = s changes output?
12 replies
MModular
Created by zverianskii on 9/15/2023 in #questions
memory leak with DynamicVector
I am not sure that is a solution. It will slow the leaking but you still don’t destroy vector and create a new one. Btw vec.clear() doesn't solve the issue
23 replies
MModular
Created by zverianskii on 9/15/2023 in #questions
memory leak with DynamicVector
https://github.com/modularml/mojo/issues/819 created an issue, lets clarify this thing. @Stole thanks a lot for the _del_old() you saved me!
23 replies
MModular
Created by zverianskii on 9/15/2023 in #questions
memory leak with DynamicVector
I attempted to use vec.resize(0) immediately after initialization, but nothing changed. Just to be clear: I don't have issues with creating the vector. My main concern is finding a way to trigger the destructors for the items, as DV doesn't handle this automatically. In my example, I anticipated that decorators would create a destructor for Point, which I could then call in the loop.
23 replies
MModular
Created by zverianskii on 9/15/2023 in #questions
memory leak with DynamicVector
I agree with you and expected that, but right now my code snippet just eats memory
23 replies
MModular
Created by zverianskii on 9/14/2023 in #questions
string chars to uint8
Thanks
12 replies
MModular
Created by zverianskii on 9/14/2023 in #questions
string chars to uint8
Anyone?😭
12 replies