built-in function to convert a numpy ndarray to escript data object
Asked by
ceguo
Hi,
To create an escript data object such as Tensor4() from a numpy ndarray, I usually do(say t = numpy.ones(
tangent = Tensor4(0.0, Function(domain))
for i in range(npts):
tangent.
Is there a built-in function for direct conversion from the numpy ndarray to the escript data, like in the opposite operation, one can use toListOfTuples()? If no, would it possible to have one implemented, as I think it's very useful when escript is coupled with other codes when data type conversion is frequently required.
Best,
Ning
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- ceguo
- Solved:
- Last query:
- Last reply:
To post a message you must log in.