Skip to content

Commit

Permalink
This is a further improvement for issue #152. Fortran ordered arrays …
Browse files Browse the repository at this point in the history
…are also not handled correctly, so we need to do a copy for these too.

tags: BUGFIX
  • Loading branch information
jmansour committed Jul 20, 2017
1 parent 32941d7 commit 722802d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion underworld/function/_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,8 @@ class `FunctionInput`. lists/tuples must contain floats only.
inputType = ArrayType
# lets check if this array owns its data.. process directly if it does, otherwise take a copy..
# this is to avoid a bug in the way we parse non-trivial numpy arrays. will fix in future. #152
if not (inputData.base is None):
# Note, we also added the check for 'F_CONTIGUOUS' as we also don't handle this correctly it seems.
if (not (inputData.base is None)) or inputData.flags['F_CONTIGUOUS']:
inputData = inputData.copy()
return _cfn.Query(self._fncself).query(_cfn.NumpyInput(inputData,inputType))
else:
Expand Down

0 comments on commit 722802d

Please sign in to comment.