Replies: 1 comment 5 replies
-
Hi Marc, Yes, good point. The work for the integral attribute is ongoing anf not finished for all array operations. The I can do a round of editing in the short term fixing a lot of these functions. But you can also do some and put it an a PR. I would suggest starting with just a few to see how things go. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I have several experiments using numpy-like arrays with secure integers and I am currently switching them to fixed-point numbers. However, this change turns out to be a bit challenging for one reason: the
integral
property of the arrays.I've a few thousands lines of codes making various manipulations on numpy-like arrays including multiple
np_transpose
. This transpose checks that that the arrayintegral
property is notNone
. However, this assertion raises exceptions everywhere in my code. My experiments starts with arrays, whose integral property is eitherTrue
orFalse
depending on the context. However, there are several MPyC functions taking as input such arrays and outputting an array withintegral == None
. Hence, the code will fail on the nextnp_transpose
. I can isolate some snippets if needed.Here are examples of functions "forgetting" the integral property:
np_sum
,np_vstack
,np_update
Then, I want to discuss to things:
assert
necessary innp_transpose
? I am starting to understand the MPyC philosophy but I may miss some subtle details.integral
property is "forgotten" by some MPyC functions? Intuitively, I would say that the integral can always be inferred from theintegral
property of the input. For example, innp_sum
, the output should inherit the property of the input.By the way, I can give a hand and prepare a dedicated PR if we agree on the (hypothetical) necessary changes.
Beta Was this translation helpful? Give feedback.
All reactions