Closed willsharpless closed 3 years ago
Currently, we don't support Python **
operation. Can you try hcl.power(x, y)
instead? It returns x**y
.
Thank you! I actually just wrote out x*x
and x*x*x
so that I could do np math with them too but your suggestion nonetheless fixed my problem.
Hi,
I have some parameter-varying models for which I use (4-degree) polynomials to fit the parameter dependence. Previously with static parameters, I had no problem using lists of python floats for hcl computation. However, to incorporate the pv, I passed lambda functions to evaluate the polynomials where I pull the coefficients of the polynomials from lists and this produces a
TypeError
aboutTensorSlice
's. See this minimized example,then later trying to use this function
returns an error trace that ends with:
I tried to copy
copy.copy(p_ic[i][0])
around the indexed values but it didn't help.Is there a fix to this so that I don't have to significantly change the definition of r or A in the global scope? If not what are my options? Thank you in advance.