a2=a.deepCpy() ; a2[ids]-=b[ids] ; self.assertTrue(a2.isEqual(a,1e-15))
pass
+ def testSwig2CheckAndPreparePermutation1(self):
+ a=DataArrayInt([10003,9999999,5,67])
+ self.assertTrue(a.checkAndPreparePermutation().isEqual(DataArrayInt([2,3,0,1])))
+ a=DataArrayInt([10003,-9999999,5,67])
+ self.assertTrue(a.checkAndPreparePermutation().isEqual(DataArrayInt([3,0,1,2])))
+ a=DataArrayInt([])
+ self.assertTrue(a.checkAndPreparePermutation().isEqual(DataArrayInt([])))
+ pass
+
def setUp(self):
pass
pass
static DataArrayInt *Pow(const DataArrayInt *a1, const DataArrayInt *a2) throw(INTERP_KERNEL::Exception);
void powEqual(const DataArrayInt *other) throw(INTERP_KERNEL::Exception);
public:
- static int *CheckAndPreparePermutation(const int *start, const int *end);
static DataArrayInt *Range(int begin, int end, int step) throw(INTERP_KERNEL::Exception);
%extend
{