Skip to content

Commit 7e38ef1

Browse files
committed
docs: create docs dir
1 parent ab7bc62 commit 7e38ef1

File tree

5 files changed

+610
-1
lines changed

5 files changed

+610
-1
lines changed

lib/node_modules/@stdlib/ndarray/base/eye/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ The function accepts the following arguments:
8181
## Notes
8282

8383
- If the provided [data type][@stdlib/ndarray/dtypes] is complex, the function returns an ndarray whose kth diagonal is filled with complex numbers whose real component equals one and imaginary component equals zero
84-
8584
- If `k` is greater than the number of columns or less than number of negative rows, the function returns an array filled with zeros
8685

8786
</section>
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
2+
{{alias}}( dtype, rows, cols, k, order )
3+
Creates a two-dimensional array with ones on the kth diagonal and zeros
4+
elsewhere.
5+
6+
If the provided data type is complex, the function returns an ndarray
7+
whose kth diagonal is filled with complex numbers whose real component
8+
equals one and imaginary component equals zero.
9+
10+
Parameters
11+
----------
12+
dtype: string|DataType
13+
Underlying data type.
14+
15+
rows: NonNegativeInteger
16+
Number of rows.
17+
18+
cols: NonNegativeInteger
19+
Number of columns.
20+
21+
k: integer
22+
Diagonal index. Positive refers to upper diagonal, and negative refers
23+
to lower diagonal.
24+
25+
order: string
26+
Memory layout (either row-major or column-major).
27+
28+
Returns
29+
-------
30+
out: ndarray
31+
Output array.
32+
33+
Examples
34+
--------
35+
> var arr = {{alias}}( 'float64', 2, 2, 0, 'row-major' )
36+
<ndarray>
37+
> var sh = {{alias:@stdlib/ndarray/shape}}( arr )
38+
[ 2, 2 ]
39+
> var data = {{alias:@stdlib/ndarray/to-array}}( arr )
40+
[ [ 1, 0 ], [ 0, 1 ] ]
41+
--------
42+
43+
See Also
44+
--------

0 commit comments

Comments
 (0)