You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,6 +88,17 @@ var obj = ndarraylike2object( arr );
88
88
-**getter**: accessor for retrieving a data buffer element.
89
89
-**setter**: accessor for setting a data buffer element.
90
90
91
+
- The getter accessor accepts two arguments:
92
+
93
+
-**data**: data buffer.
94
+
-**idx**: element index.
95
+
96
+
- The setter accessor accepts three arguments:
97
+
98
+
-**data**: data buffer.
99
+
-**idx**: element index.
100
+
-**value**: value to set.
101
+
91
102
- This function is intended as a potential performance optimization. In V8, for example, even if two objects share common properties, if those properties were added in different orders or if one object has additional properties not shared by the other object, then those objects will have different "hidden" classes. If a function is provided many objects having different "shapes", some JavaScript VMs (e.g., V8) will consider the function "megamorphic" and fail to perform various runtime optimizations. Accordingly, the intent of this function is to standardize the "shape" of the object holding [`ndarray`][@stdlib/ndarray/ctor] meta data to ensure that internal functions operating on ndarrays are provided consistent argument "shapes".
0 commit comments