|
2 | 2 |
|
3 | 3 | This page documents array dtypes supported by PyGMT.
|
4 | 4 |
|
5 |
| -## NumPy Dtypes |
6 |
| - |
7 |
| -NumPy provides 24 fundamental dtypes. Not all of them are supported by PyGMT. |
8 |
| -Among the 17 numeric dtypes, only 12 of them are supported. |
9 |
| - |
10 |
| -| NumPy dtype | Support | Notes | |
11 |
| -|----------------|---------|-------| |
12 |
| -| np.int8 | Y | | |
13 |
| -| np.int16 | Y | | |
14 |
| -| np.int32 | Y | | |
15 |
| -| np.int64 | Y | | |
16 |
| -| np.longlong | Y | | |
17 |
| -| np.uint8 | Y | | |
18 |
| -| np.uint16 | Y | | |
19 |
| -| np.uint32 | Y | | |
20 |
| -| np.uint64 | Y | | |
21 |
| -| np.ulonglong | Y | | |
22 |
| -| np.float16 | N | | |
23 |
| -| np.float32 | Y | | |
24 |
| -| np.float64 | Y | | |
25 |
| -| np.longdouble | N | | |
26 |
| -| np.complex64 | N | | |
27 |
| -| np.complex128 | N | | |
28 |
| -| np.clongdouble | N | | |
29 |
| - |
30 |
| -For raster images, only 8-bit unsigned intergers (i.e., `np.uint8`) are supported. |
31 |
| - |
32 |
| -## Pandas Dtypes |
33 |
| - |
34 |
| -| Pandas dtype | Support | Notes | |
35 |
| -|----------------|---------|-------| |
36 |
| -| pd.Int8 | Y | | |
37 |
| -| pd.Int16 | Y | | |
38 |
| -| pd.Int32 | Y | | |
39 |
| -| pd.Int64 | Y | | |
40 |
| -| pd.UInt8 | Y | | |
41 |
| -| pd.UInt16 | Y | | |
42 |
| -| pd.UInt32 | Y | | |
43 |
| -| pd.UInt64 | Y | | |
44 |
| -| pd.Float32 | Y | | |
45 |
| -| pd.Float64 | Y | | |
46 |
| - |
47 |
| -## PyArrow Dtypes |
48 |
| - |
49 |
| -| PyArrow dtype | Support | Notes | |
50 |
| -|----------------|---------|-------| |
51 |
| -| pa.int8 | Y | | |
52 |
| -| pa.int16 | Y | | |
53 |
| -| pa.int32 | Y | | |
54 |
| -| pa.int64 | Y | | |
55 |
| -| pa.uint8 | Y | | |
56 |
| -| pa.uint16 | Y | | |
57 |
| -| pa.uint32 | Y | | |
58 |
| -| pa.uint64 | Y | | |
59 |
| -| pa.float16 | N | | |
60 |
| -| pa.float32 | Y | | |
61 |
| -| pa.float64 | Y | | |
| 5 | +## Numeric Dtypes |
| 6 | + |
| 7 | +PyGMT supports most numeric dtypes provided by NumPy, pandas and PyArrow, including the following: |
| 8 | + |
| 9 | +**Signed Integers:** |
| 10 | + |
| 11 | +- :class:`numpy.int8`, :class:`numpy.int16`, :class:`numpy.int32`, :class:`numpy.int64` |
| 12 | +- :class:`pandas.Int8`, :class:`pandas.Int16`, :class:`pandas.Int32`, :class:`pandas.Int64` |
| 13 | +- :class:`pyarrow.int8`, :class:`pyarrow.int16`, :class:`pyarrow.int32`, :class:`pyarrow.int64` |
| 14 | + |
| 15 | +**Unsigned Integers:** |
| 16 | + |
| 17 | +- :class:`numpy.uint8`, :class:`numpy.uint16`, :class:`numpy.uint32`, :class:`numpy.uint64` |
| 18 | +- :class:`pandas.UInt8`, :class:`pandas.UInt16`, :class:`pandas.UInt32`, :class:`pandas.UInt64` |
| 19 | +- :class:`pyarrow.uint8`, :class:`pyarrow.uint16`, :class:`pyarrow.uint32`, :class:`pyarrow.uint64` |
| 20 | + |
| 21 | +**Floating-point numbers:** |
| 22 | + |
| 23 | +- :class:`numpy.float32`, :class:`numpy.float64` |
| 24 | +- :class:`pandas.Float32`, :class:`pandas.Float64` |
| 25 | +- :class:`pyarrow.float32`, :class:`pyarrow.float64` |
| 26 | + |
| 27 | +For raster images, only 8-bit unsigned intergers (i.e., :class:``)) are supported. |
| 28 | + |
| 29 | +## String Dtypes |
| 30 | + |
| 31 | +## Datetime Dtypes |
0 commit comments