-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b45aa03
commit 8a7862d
Showing
20 changed files
with
263 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# NDArray::diag | ||
|
||
```php | ||
public static function diag(NDArray|array $a): NDArray; | ||
``` | ||
Extract a diagonal or construct a diagonal array. | ||
|
||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# NDArray::slice | ||
|
||
```php | ||
public function slice(...$indices): NDArray|float; | ||
``` | ||
Array slicing, each argument represents a slice of a dimension. | ||
|
||
Empty arrays represent all values of a dimension, arrays with values are treated in | ||
the format `[start, stop, step]`, when only one value exists, it is automatically | ||
assigned to stop `[0, stop, 1]`, the default value of start is 0 and step is 1. | ||
|
||
When instead of an array, a number is passed, it is also assigned to the | ||
stop of that dimension `[0, stop, 1]`. | ||
|
||
--- | ||
|
||
## Notes | ||
|
||
:::tip | ||
|
||
#### GPU SUPPORTED | ||
This operation is supported by GPU (VRAM). | ||
|
||
::: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# NDArray::full | ||
|
||
```php | ||
public static function full(int[] $shape, float|int $fill_value): NDArray; | ||
``` | ||
Return a new array of given shape and type, filled with $fill_value. | ||
|
||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# NDArray::append | ||
|
||
```php | ||
public static function append(NDArray|array $array, NDArray|array $values, ?int $axis): NDArray | ||
``` | ||
Append values to the end of an array. | ||
|
||
--- | ||
|
||
## Notes | ||
|
||
:::tip | ||
|
||
#### GPU SUPPORTED | ||
This operation is supported by GPU (VRAM). | ||
|
||
::: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# NDArray::hstack | ||
|
||
```php | ||
public static function concatenate(NDArray[] $arrays, ?int $axis = 0): NDArray; | ||
``` | ||
Join a sequence of arrays along an existing axis. | ||
|
||
--- | ||
|
||
## Notes | ||
|
||
:::tip | ||
|
||
#### GPU SUPPORTED | ||
This operation is supported by GPU (VRAM). | ||
|
||
::: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# NDArray::dstack | ||
|
||
```php | ||
public static function dstack(array $arrays): NDArray; | ||
``` | ||
Stack arrays in sequence depth wise (along third axis). | ||
|
||
--- | ||
|
||
## Notes | ||
|
||
:::tip | ||
|
||
#### GPU SUPPORTED | ||
This operation is supported by GPU (VRAM). | ||
|
||
::: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# NDArray::fill | ||
|
||
```php | ||
public function fill(float|int $fill_value): NDArray; | ||
``` | ||
Fill the array with a scalar value. | ||
|
||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# NDArray::hstack | ||
|
||
```php | ||
public static function hstack(array $arrays): NDArray; | ||
``` | ||
Stack arrays in sequence horizontally (column wise). | ||
|
||
--- | ||
|
||
## Notes | ||
|
||
:::tip | ||
|
||
#### GPU SUPPORTED | ||
This operation is supported by GPU (VRAM). | ||
|
||
::: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# NDArray::moveaxis | ||
|
||
```php | ||
public static function moveaxis(NDArray|array|float|int $a, int|int[] $source, int|int[] $destination): NDArray; | ||
``` | ||
Move axes of an array to new positions. | ||
|
||
--- | ||
|
||
## Notes | ||
|
||
:::tip | ||
|
||
#### GPU SUPPORTED | ||
This operation is supported by GPU (VRAM). | ||
|
||
::: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# NDArray::rollaxis | ||
|
||
```php | ||
public static function rollaxis(NDArray|array|float|int $a, int $axis, int $start = 0): NDArray; | ||
``` | ||
Roll the specified axis backwards, until it lies in a given position. | ||
|
||
--- | ||
|
||
## Notes | ||
|
||
:::tip | ||
|
||
#### GPU SUPPORTED | ||
This operation is supported by GPU (VRAM). | ||
|
||
::: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# NDArray::squeeze | ||
|
||
```php | ||
public static function squeeze(NDArray|array $a, int|int[] $axis): NDArray|float; | ||
``` | ||
Remove axes of length one from $a. | ||
|
||
--- | ||
|
||
## Notes | ||
|
||
:::tip | ||
|
||
#### GPU SUPPORTED | ||
This operation is supported by GPU (VRAM) and contains a custom CUDA kernel. | ||
|
||
::: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# NDArray::swapaxes | ||
|
||
```php | ||
public static function swapaxes(NDArray|array|float|int $a, int $axis1, int $axis2): NDArray; | ||
``` | ||
Interchange two axes of an array. | ||
|
||
--- | ||
|
||
## Notes | ||
|
||
:::tip | ||
|
||
#### GPU SUPPORTED | ||
This operation is supported by GPU (VRAM). | ||
|
||
::: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# NDArray::vstack | ||
|
||
```php | ||
public static function vstack(array $arrays): NDArray; | ||
``` | ||
Stack arrays in sequence vertically (row wise). | ||
|
||
--- | ||
|
||
## Notes | ||
|
||
:::tip | ||
|
||
#### GPU SUPPORTED | ||
This operation is supported by GPU (VRAM). | ||
|
||
::: |
17 changes: 17 additions & 0 deletions
17
api/mathematical-functions/arithmetic/ndarray-positive.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# NDArray::positive | ||
|
||
```php | ||
public static function positive(NDArray|array|float|int $a): NDArray|float|int; | ||
``` | ||
Numerical positive, element-wise. | ||
|
||
--- | ||
|
||
## Notes | ||
|
||
:::tip | ||
|
||
#### GPU SUPPORTED | ||
This operation is supported by GPU (VRAM) and contains a custom CUDA kernel. | ||
|
||
::: |
19 changes: 19 additions & 0 deletions
19
api/mathematical-functions/miscellaneous/ndarray-reciprocal.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# NDArray::reciprocal | ||
|
||
```php | ||
public static function reciprocal(NDArray|array|float|int $a): NDArray|float|int; | ||
``` | ||
Return the reciprocal of the argument, element-wise. | ||
|
||
Calculates `1 / $a` | ||
|
||
--- | ||
|
||
## Notes | ||
|
||
:::tip | ||
|
||
#### GPU SUPPORTED | ||
This operation is supported by GPU (VRAM) and contains a custom CUDA kernel. | ||
|
||
::: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"label": "Sorting & Searching", | ||
"position": 2, | ||
"link": { | ||
"type": "generated-index", | ||
"description": "NumPower sorting methods." | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# NDArray::argmax | ||
|
||
```php | ||
public static function argmax(NDArray|array $a, ?int $axis): NDArray; | ||
``` | ||
Returns the indices of the maximum values along an axis. | ||
|
||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# NDArray::argmin | ||
|
||
```php | ||
public static function argmin(NDArray|array $a, ?int $axis): NDArray; | ||
``` | ||
Returns the indices of the minimum values along an axis. | ||
|
||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters