Skip to content

Commit 2c59326

Browse files
committed
Add docs for the supported numeric dtypes
1 parent 4498f71 commit 2c59326

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

doc/techref/array_dtypes.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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+
- `numpy.int8`, `numpy.int16`, `numpy.int32`, `numpy.int64`
15+
- `pandas.Int8`, `pandas.Int16`, `pandas.Int32`, `pandas.Int64`
16+
- `pyarrow.int8`, `pyarrow.int16`, `pyarrow.int32`, `pyarrow.int64`
17+
18+
**Unsigned Integers:**
19+
20+
- `numpy.uint8`, `numpy.uint16`, `numpy.uint32`, `numpy.uint64`
21+
- `pandas.UInt8`, `pandas.UInt16`, `pandas.UInt32`, `pandas.UInt64`
22+
- `pyarrow.uint8`, `pyarrow.uint16`, `pyarrow.uint32`, `pyarrow.uint64`
23+
24+
**Floating-point numbers:**
25+
26+
- `numpy.float32`, `numpy.float64`
27+
- `pandas.Float32`, `pandas.Float64`
28+
- `pyarrow.float32`, `pyarrow.float64`
29+
30+
For 3-D {class}`xarray.DataArray` objects representing raster images, only 8-bit unsigned
31+
intergers (i.e., `numpy.uint8`) are supported.
32+
33+
## String Dtypes
34+
35+
## Datetime Dtypes

doc/techref/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ visit the {gmt-docs}`GMT Technical Reference <reference.html>`.
88
```{toctree}
99
:maxdepth: 1
1010
11+
array_dtypes.md
1112
projections.md
1213
fonts.md
1314
patterns.md

0 commit comments

Comments
 (0)