-
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.
docs: update with new methods and change homepage.
- Loading branch information
1 parent
9a7f9a6
commit 4ea0f0c
Showing
16 changed files
with
279 additions
and
23 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
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 @@ | ||
import TabItem from "@theme/TabItem"; | ||
import Tabs from "@theme/Tabs"; | ||
|
||
# NDArray::atleast_1d | ||
|
||
```php | ||
public function atleast_1d(NDArray|array|GdImage $array): 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,19 @@ | ||
import TabItem from "@theme/TabItem"; | ||
import Tabs from "@theme/Tabs"; | ||
|
||
# NDArray::atleast_2d | ||
|
||
```php | ||
public function atleast_2d(NDArray|array|GdImage $array): 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,19 @@ | ||
import TabItem from "@theme/TabItem"; | ||
import Tabs from "@theme/Tabs"; | ||
|
||
# NDArray::atleast_3d | ||
|
||
```php | ||
public function atleast_3d(NDArray|array|GdImage $array): 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,91 @@ | ||
import TabItem from "@theme/TabItem"; | ||
import Tabs from "@theme/Tabs"; | ||
|
||
# NDArray::expand_dims | ||
|
||
```php | ||
public function expand_dims(NDArray|array|GdImage $target, array|int $axis): array; | ||
``` | ||
Adds a new axis to the array at the specified position, thereby expanding its shape. | ||
|
||
--- | ||
|
||
## Parameters | ||
|
||
### `$target` | ||
- **Type** - NDArray | array | GdImage | ||
- Target array. | ||
|
||
### `$axis` | ||
- **Type** - array | int | ||
- This parameter specifies the position where the new axis (or axes) will be inserted within the expanded array. | ||
|
||
--- | ||
|
||
## Examples | ||
|
||
<Tabs> | ||
<TabItem value="example1" label="Example 1" default> | ||
|
||
|
||
```php | ||
use \NDArray as nd; | ||
|
||
$a = nd::array([[1, 2], [3, 4]]); | ||
echo nd::expand_dims($a, [0, 1]); | ||
``` | ||
```text @title="Output" | ||
[[[1, 2, 3, 4]]] | ||
``` | ||
|
||
|
||
</TabItem> | ||
<TabItem value="example2" label="Example 2" default> | ||
|
||
|
||
```php | ||
use \NDArray as nd; | ||
|
||
$a = nd::array([1, 2, 3, 4]); | ||
echo nd::expand_dims($val, -1); | ||
``` | ||
```text @title="Output" | ||
[[1] | ||
[2] | ||
[3] | ||
[4]] | ||
``` | ||
|
||
|
||
</TabItem> | ||
<TabItem value="example3" label="Example 3" default> | ||
|
||
|
||
```php | ||
use \NDArray as nd; | ||
|
||
$a = nd::array([[1, 2], [3, 4]]); | ||
echo nd::expand_dims($val, 4); | ||
``` | ||
```text @title="Output" | ||
Fatal error: Uncaught Error: invalid axis or axes provided. in /home/henrique/Documentos/Repositórios/numpower/test.php:8 | ||
Stack trace: | ||
#0 /home/numpower/test.php(4): NDArray::expand_dims(Object(NDArray), 5) | ||
#1 {main} | ||
thrown in /home/numpower/test.php on line 4 | ||
``` | ||
|
||
|
||
</TabItem> | ||
</Tabs> | ||
|
||
--- | ||
|
||
## 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 @@ | ||
{ | ||
"label": "Signal Processing", | ||
"position": 2, | ||
"link": { | ||
"type": "generated-index", | ||
"description": "NumPower signal processing tools." | ||
} | ||
} |
File renamed without changes.
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,48 @@ | ||
# NDArray::correlate2d | ||
|
||
```php | ||
public static function convolve2d(NDArray|array|GdImage $a, NDArray|array|GdImage $b, string $mode, string $boundary, scalar $fill_value = 0.0f): NDArray; | ||
``` | ||
Convolve two 2-dimensional arrays. | ||
|
||
Convolve `$a` and `$b` with output size determined by `$mode`, and boundary conditions determined by `$boundary` and `$fill_value`. | ||
|
||
#### $mode options | ||
|
||
- **full** - Full discrete linear convolution of the inputs | ||
- **valid** - The output consists only of those elements that do not rely on the zero-padding. In ‘valid’ mode, either `$a` or `$b` must be at least as large as the other in every dimension. | ||
- **same** - The output is the same size as `$a`, centered with respect to the ‘full’ output. | ||
|
||
#### $boundary options | ||
|
||
- **fill** - Pad input arrays with `$fill_value` | ||
- **wrap** - Circular boundary | ||
- **symm** - Symmetrical boundary | ||
|
||
--- | ||
|
||
## Parameters | ||
|
||
### `$a` `$b` | ||
- **Type** - NDArray | array | GdImage | ||
- The arrays to perform the convolution. | ||
|
||
### `$mode` | ||
- **Type** - string | ||
- The size of the output. Can be: `full`, `valid` and `same` | ||
|
||
### `$boundary` | ||
- **Type** - string | ||
- A flag indicating how to handle boundaries. Can be: `fill`, `wrap` and `symm` | ||
|
||
--- | ||
|
||
|
||
## 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
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 @@ | ||
import React from 'react'; | ||
|
||
export default function TypingCode() { | ||
return ( | ||
<div style={{position: 'absolute', float: 'left', zIndex: 1, width: '100%', textAlign: 'left'}}> | ||
<div className="row"> | ||
<div className="col typecode" style={{width: '100%', marginLeft: '50px'}}><p><img | ||
src="https://readme-typing-svg.demolab.com?font=Fira+Code&duration=2000&pause=500&multiline=true&width=435&height=100&separator=%3C&lines=%24a+%3D+nd%3A%3Aarray(%5B%5B1%2C+2%5D%2C+%5B3%2C+4%5D%5D);%3C%24b+%3D+%24a+*+2;%3Cprint_r(%24b);" | ||
alt="Typing SVG"/></p></div> | ||
<div className="col typecode" style={{width: '100%', textAlign: 'right'}}><p><img | ||
src="https://readme-typing-svg.demolab.com?font=Fira+Code&duration=2000&pause=500&multiline=true&width=435&height=100&separator=%3C&lines=%24a_gpu+%3D+%24a-%3Egpu();%3C%24b_gpu+%3D+%24b-%3Egpu();%3C%24m+%3D+nd%3A%3Amatmul(%24a_gpu%2C+%24b_gpu);" | ||
alt="Typing SVG"/></p></div> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
Empty file.
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 |
---|---|---|
|
@@ -8,4 +8,4 @@ | |
.featureSvg { | ||
height: 200px; | ||
width: 200px; | ||
} | ||
} |
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
Oops, something went wrong.