Skip to content

Commit c0ded0d

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

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

doc/techref/array_dtypes.md

+35
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+
- {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

doc/techref/index.md

+1
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)