|
| 1 | +# Supported Array Dtypes |
| 2 | + |
| 3 | +PyGMT uses NumPy arrays to store data and passes them to the GMT C library. In this way, |
| 4 | +PyGMT can support a wide range of dtypes. This page documents array dtypes supported by |
| 5 | +PyGMT. |
| 6 | + |
| 7 | +## Numeric Dtypes |
| 8 | + |
| 9 | +For 1-D and 2-D arrays, PyGMT supports most numeric dtypes provided by NumPy, pandas, and |
| 10 | +PyArrow. |
| 11 | + |
| 12 | +**Signed Integers:** |
| 13 | + |
| 14 | +- {class}`numpy.int8`, {class}`numpy.int16`, {class}`numpy.int32`, {class}`numpy.int64` |
| 15 | +- {class}`pandas.Int8`, {class}`pandas.Int16`, {class}`pandas.Int32`, {class}`pandas.Int64` |
| 16 | +- {class}`pyarrow.int8`, {class}`pyarrow.int16`, {class}`pyarrow.int32`, {class}`pyarrow.int64` |
| 17 | + |
| 18 | +**Unsigned Integers:** |
| 19 | + |
| 20 | +- {class}`numpy.uint8`, {class}`numpy.uint16`, {class}`numpy.uint32`, {class}`numpy.uint64` |
| 21 | +- {class}`pandas.UInt8`, {class}`pandas.UInt16`, {class}`pandas.UInt32`, {class}`pandas.UInt64` |
| 22 | +- {class}`pyarrow.uint8`, {class}`pyarrow.uint16`, {class}`pyarrow.uint32`, {class}`pyarrow.uint64` |
| 23 | + |
| 24 | +**Floating-point numbers:** |
| 25 | + |
| 26 | +- {class}`numpy.float32`, {class}`numpy.float64` |
| 27 | +- {class}`pandas.Float32`, {class}`pandas.Float64` |
| 28 | +- {class}`pyarrow.float32`, {class}`pyarrow.float64` |
| 29 | + |
| 30 | +For 3-D {class}`xarray.DataArray` objects representing raster images, only 8-bit unsigned |
| 31 | +intergers (i.e., {class}`numpy.uint8`) are supported. |
| 32 | + |
| 33 | +## String Dtypes |
| 34 | + |
| 35 | +## Datetime Dtypes |
0 commit comments