Skip to content
This repository was archived by the owner on Feb 18, 2020. It is now read-only.

Commit 1fd2013

Browse files
Documentation updated with CArray::expand_dims
1 parent 6fac647 commit 1fd2013

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

docs/routines/dimensions.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,24 @@ public static squeeze($a, $axis = NULL) : CArray
6969
##### Returns
7070

7171
`CArray` The input array, but with all or a subset of the dimensions of length 1 removed. This is always a itself or a view into `$a`.
72+
73+
---
74+
75+
## expand_dims
76+
77+
```php
78+
public static expand_dims($a, $axis = NULL) : CArray
79+
```
80+
> Expand the shape of an array.
81+
82+
> Insert a new axis that will appear at the `$axis` position in the expanded array shape.
83+
84+
##### Parameters
85+
86+
`CArray|Array` **$a** Input data.
87+
88+
`int` **$axis** Position in the expanded axes where the new axis is placed.
89+
90+
##### Returns
91+
92+
`CArray` **View** of `$a` with the number of dimensions increased by one.

0 commit comments

Comments
 (0)