File: numpy_helper.md

package info (click to toggle)
onnx 1.20.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 62,536 kB
  • sloc: python: 77,643; cpp: 60,445; sh: 52; makefile: 50; javascript: 1
file content (63 lines) | stat: -rw-r--r-- 929 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# onnx.numpy_helper

```{eval-rst}
.. currentmodule:: onnx.numpy_helper
```

```{eval-rst}
.. autosummary::

    from_array
    from_dict
    from_list
    from_optional
    to_array
    to_dict
    to_list
    to_optional

```

(l-numpy-helper-onnx-array)=

## array

```{eval-rst}
.. autofunction:: onnx.numpy_helper.from_array
```

```{eval-rst}
.. autofunction:: onnx.numpy_helper.to_array
```

Arrays with data types not supported natively by NumPy will be return with ``ml_dtypes`` dtypes.

## sequence

```{eval-rst}
.. autofunction:: onnx.numpy_helper.to_list
```

```{eval-rst}
.. autofunction:: onnx.numpy_helper.from_list
```

## dictionary

```{eval-rst}
.. autofunction:: onnx.numpy_helper.to_dict
```

```{eval-rst}
.. autofunction:: onnx.numpy_helper.from_dict
```

## optional

```{eval-rst}
.. autofunction:: onnx.numpy_helper.to_optional
```

```{eval-rst}
.. autofunction:: onnx.numpy_helper.from_optional
```