Skip to content

Commit

Permalink
docs: update to version 0.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
henrique-borba committed Jul 16, 2024
1 parent b45aa03 commit 8a7862d
Show file tree
Hide file tree
Showing 20 changed files with 263 additions and 2 deletions.
8 changes: 8 additions & 0 deletions api/indexing/ndarray-diag.mdx
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.

---
24 changes: 24 additions & 0 deletions api/indexing/ndarray-slice.mdx
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).

:::
8 changes: 8 additions & 0 deletions api/initializers/ndarray-full.mdx
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.

---
17 changes: 17 additions & 0 deletions api/manipulation/ndarray-append.mdx
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).

:::
17 changes: 17 additions & 0 deletions api/manipulation/ndarray-concatenate.mdx
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).

:::
17 changes: 17 additions & 0 deletions api/manipulation/ndarray-dstack.mdx
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).

:::
8 changes: 8 additions & 0 deletions api/manipulation/ndarray-fill.mdx
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.

---
17 changes: 17 additions & 0 deletions api/manipulation/ndarray-hstack.mdx
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).

:::
17 changes: 17 additions & 0 deletions api/manipulation/ndarray-moveaxis.mdx
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).

:::
17 changes: 17 additions & 0 deletions api/manipulation/ndarray-rollaxis.mdx
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).

:::
17 changes: 17 additions & 0 deletions api/manipulation/ndarray-squeeze.mdx
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.

:::
17 changes: 17 additions & 0 deletions api/manipulation/ndarray-swapaxes.mdx
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).

:::
2 changes: 1 addition & 1 deletion api/manipulation/ndarray-transpose.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ Return the transpose of matrix `$a`
:::tip

#### GPU SUPPORTED
This operation is supported by GPU (VRAM) and contains a custom CUDA kernel.
This operation is supported by GPU (VRAM).

:::
17 changes: 17 additions & 0 deletions api/manipulation/ndarray-vstack.mdx
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 api/mathematical-functions/arithmetic/ndarray-positive.mdx
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 api/mathematical-functions/miscellaneous/ndarray-reciprocal.mdx
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.

:::
8 changes: 8 additions & 0 deletions api/sorting-searching/_category_.json
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."
}
}
8 changes: 8 additions & 0 deletions api/sorting-searching/ndarray-argmax.mdx
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.

---
8 changes: 8 additions & 0 deletions api/sorting-searching/ndarray-argmin.mdx
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.

---
2 changes: 1 addition & 1 deletion src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function HomepageHeader() {
<Link
className="button button--secondary button--lg"
to="/install/install">
Install NumPower (0.5.2)
Install NumPower (0.6.0)
</Link>
</div>
</div>
Expand Down

0 comments on commit 8a7862d

Please sign in to comment.