28 |
import escript |
import escript |
29 |
import os |
import os |
30 |
|
|
|
# missing tests: |
|
|
|
|
|
# def pokeShape(arg): |
|
|
# def pokeDim(arg): |
|
|
# def commonShape(arg0,arg1): |
|
|
# def commonDim(*args): |
|
|
# def testForZero(arg): |
|
|
# def matchType(arg0=0.,arg1=0.): |
|
|
# def matchShape(arg0,arg1): |
|
|
|
|
|
# def reorderComponents(arg,index): |
|
|
|
|
|
# |
|
|
# slicing: get |
|
|
# set |
|
|
# |
|
|
# and derivatives |
|
|
|
|
31 |
#========================================================= |
#========================================================= |
32 |
# some helpers: |
# some helpers: |
33 |
#========================================================= |
#========================================================= |
3382 |
@rtype: L{numarray.NumArray}, L{escript.Data}, L{Symbol} depending on the input |
@rtype: L{numarray.NumArray}, L{escript.Data}, L{Symbol} depending on the input |
3383 |
@remark: for L{escript.Data} objects the dimension is restricted to 3. |
@remark: for L{escript.Data} objects the dimension is restricted to 3. |
3384 |
""" |
""" |
3385 |
|
import numarray.linear_algebra # This statement should be after the next statement but then somehow numarray is gone. |
3386 |
if isinstance(arg,numarray.NumArray): |
if isinstance(arg,numarray.NumArray): |
|
import numarray.linear_algebra |
|
3387 |
return numarray.linear_algebra.inverse(arg) |
return numarray.linear_algebra.inverse(arg) |
3388 |
elif isinstance(arg,escript.Data): |
elif isinstance(arg,escript.Data): |
3389 |
return escript_inverse(arg) |
return escript_inverse(arg) |