Skip to content

Commit d0a4d9b

Browse files
authored
new java and python abstractors
1 parent f217dfb commit d0a4d9b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

cg/python2UML.cstl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,8 @@ _1 | _2 |-->MathLib.bitwiseOr(_1, _2)
314314
_1 _2 _3 |-->_1_2<when> _2`isBasicTypeTrailer true, _3 matches .value
315315

316316
_1 _2 |-->MatrixLib.shape(_1)<when> _2 matches .shape
317+
_1 _2 |-->MatrixLib.shape(_1)->size()<when> _2 matches .ndim
318+
_1 _2 |-->MatrixLib.shape(_1)->prd()<when> _2 matches .size
317319

318320
_1 _2 |-->OclIterator.newOclIterator_Function(lambda _i : int in self._1(_i))<when> _1 generator, _2 trailer
319321

@@ -875,6 +877,7 @@ trailer::
875877

876878
. maxlen |-->->size()
877879

880+
878881
. _1 |-->._1
879882
. _1 _* |-->._1_*
880883
_1 |-->_1
@@ -1037,6 +1040,11 @@ numpyTrailer::
10371040
. e |-->MathLib.eValue()
10381041
. euler_gamma |-->MathLib.gammaValue()
10391042

1043+
. int32 |-->OclType["int"]
1044+
. int64 |-->OclType["long"]
1045+
. float32 |-->OclType["double"]
1046+
. float64 |-->OclType["double"]
1047+
10401048
. arange _1 |-->MathLib.numericRange(0, _1, 1)<when> _1`argCount 1
10411049
. arange _1 |-->MathLib.numericRange(_1`firstArg, _1`secondArg, 1)<when> _1`argCount 3
10421050
. arange _1 |-->MathLib.numericRange(_1`firstArg, _1`secondArg, _1`thirdArg)<when> _1`argCount 5
@@ -1048,10 +1056,13 @@ numpyTrailer::
10481056
. prod _1 |-->MatrixLib.prdMatrix(_1`firstArg)
10491057
. sum _1 |-->MatrixLib.sumMatrix(_1`firstArg)
10501058

1059+
. sort _1 |-->_1->sort()
1060+
10511061
. shape _1 |-->MatrixLib.shape_1
10521062

10531063
. array _1 |-->_1
10541064

1065+
. concatenate _1 |-->_1->concatenateAll()
10551066
. copyto _1 |-->_1`firstArg := (_1`secondArg)->copy()
10561067

10571068
. empty _1 |-->MatrixLib.singleValueMatrix(_1`firstArg, 0.0)

0 commit comments

Comments
 (0)