Skip to content

Is it not possible to apply numpy in a cell? #100

Answered by fumitoh
bakerwy asked this question in Q&A
Discussion options

You must be logged in to vote

Yes. If NO_SURRS is defined in the Projection space, then you can assign the numpy module to the np attribute of Projection like this:

import numpy as np
Projection.np = np

After this, np becomes referable in any formulas in Projection, including NO_SURRS.

Insted, if you assign the numpy module to the np attribute of the model instead, then np becomes referable from any formulas in all spaces in the model.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by bakerwy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants