Skip to content

Commit

Permalink
Add docs for the supported numeric dtypes
Browse files Browse the repository at this point in the history
  • Loading branch information
seisman committed Nov 6, 2024
1 parent 4498f71 commit 2c59326
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
35 changes: 35 additions & 0 deletions doc/techref/array_dtypes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Supported Array Dtypes

PyGMT uses NumPy arrays to store data and passes them to the GMT C library. In this way,
PyGMT can support a wide range of dtypes. This page documents array dtypes supported by
PyGMT.

## Numeric Dtypes

For 1-D and 2-D arrays, PyGMT supports most numeric dtypes provided by NumPy, pandas, and
PyArrow.

**Signed Integers:**

- `numpy.int8`, `numpy.int16`, `numpy.int32`, `numpy.int64`
- `pandas.Int8`, `pandas.Int16`, `pandas.Int32`, `pandas.Int64`
- `pyarrow.int8`, `pyarrow.int16`, `pyarrow.int32`, `pyarrow.int64`

**Unsigned Integers:**

- `numpy.uint8`, `numpy.uint16`, `numpy.uint32`, `numpy.uint64`
- `pandas.UInt8`, `pandas.UInt16`, `pandas.UInt32`, `pandas.UInt64`
- `pyarrow.uint8`, `pyarrow.uint16`, `pyarrow.uint32`, `pyarrow.uint64`

**Floating-point numbers:**

- `numpy.float32`, `numpy.float64`
- `pandas.Float32`, `pandas.Float64`
- `pyarrow.float32`, `pyarrow.float64`

For 3-D {class}`xarray.DataArray` objects representing raster images, only 8-bit unsigned
intergers (i.e., `numpy.uint8`) are supported.

## String Dtypes

## Datetime Dtypes
1 change: 1 addition & 0 deletions doc/techref/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ visit the {gmt-docs}`GMT Technical Reference <reference.html>`.
```{toctree}
:maxdepth: 1
array_dtypes.md
projections.md
fonts.md
patterns.md
Expand Down

0 comments on commit 2c59326

Please sign in to comment.