@@ -18,11 +18,11 @@ function M.Add (array_module, meta)
1818 local GetLib = array_module .GetLib
1919
2020 --
21- local function Wrap (name )
21+ local function Get (name )
2222 name = " af_" .. name
2323
2424 return function (arr )
25- return CallWrap (name , arr :get ())
25+ return Call (name , arr :get ())
2626 end
2727 end
2828
@@ -53,7 +53,9 @@ function M.Add (array_module, meta)
5353 end ,
5454
5555 --
56- copy = Wrap (" copy_array" ),
56+ copy = function (arr )
57+ return CallWrap (" af_copy_array" , arr :get ())
58+ end ,
5759
5860 --
5961 dims = function (arr , i )
@@ -65,51 +67,51 @@ function M.Add (array_module, meta)
6567 end ,
6668
6769 --
68- elements = function (arr )
69- return Call (" af_get_elements" , arr :get ())
70- end ,
70+ elements = Get (" get_elements" ),
7171
7272 --
73- eval = Wrap (" eval" ),
73+ eval = function (arr )
74+ Call (" af_eval" , arr :get ())
75+ end ,
7476
7577 --
7678 get = array_module .GetHandle ,
7779
7880 --
79- isbool = Wrap (" is_bool" ),
81+ isbool = Get (" is_bool" ),
8082
8183 --
82- iscolumn = Wrap (" is_column" ),
84+ iscolumn = Get (" is_column" ),
8385
8486 --
85- iscomplex = Wrap (" is_complex" ),
87+ iscomplex = Get (" is_complex" ),
8688
8789 --
88- isdouble = Wrap (" is_double" ),
90+ isdouble = Get (" is_double" ),
8991
9092 --
91- isempty = Wrap (" is_empty" ),
93+ isempty = Get (" is_empty" ),
9294
9395 --
94- isfloating = Wrap (" is_floating" ),
96+ isfloating = Get (" is_floating" ),
9597
9698 --
97- isinteger = Wrap (" is_integer" ),
99+ isinteger = Get (" is_integer" ),
98100
99101 --
100- isrealfloating = Wrap (" is_real_floating" ),
102+ isrealfloating = Get (" is_real_floating" ),
101103
102104 --
103- isrow = Wrap (" is_row" ),
105+ isrow = Get (" is_row" ),
104106
105107 --
106- isscalar = Wrap (" is_scalar" ),
108+ isscalar = Get (" is_scalar" ),
107109
108110 --
109- issingle = Wrap (" is_single" ),
111+ issingle = Get (" is_single" ),
110112
111113 --
112- isvector = Wrap (" is_vector" ),
114+ isvector = Get (" is_vector" ),
113115
114116 --
115117 H = function (arr )
@@ -129,7 +131,7 @@ function M.Add (array_module, meta)
129131 return GetLib ().transpose (arr )
130132 end ,
131133
132- type = Wrap (" get_type" )
134+ type = Get (" get_type" )
133135 } do
134136 meta [k ] = v
135137 end
0 commit comments