print breaks code
the following isn't catched by the linter but breaks, what am I doing wrong?
8 Replies
Put this after memcpy:
this one breaks, it seems to have undefined type
Sorry i wasn't being very clear. You are suppose to change
arr
and type
to own needmy bad, hadn't noticed the [type] placeholder. It crashes later, but it's still nicer 🙂 thanks
this piece of black magic works. Why? 😮
This should do the trick as well. Basically, it tells the compiler to not free
pylogits
before the memcpy
.
We have something called ASAP destructionDeath of a value | Modular Docs
An explanation of when and how Mojo destroys values.
oh sure that makes sense! thanks 🤗