Skip to content

Commit 0feb02c

Browse files
committed
Support 1-D/2-D numpy arrays with longlong and ulonglong dtype (#3566)
1 parent 8f16aa0 commit 0feb02c

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

pygmt/clib/session.py

+7-4
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,12 @@
8888
np.int16: "GMT_SHORT",
8989
np.int32: "GMT_INT",
9090
np.int64: "GMT_LONG",
91+
np.longlong: "GMT_LONG",
9192
np.uint8: "GMT_UCHAR",
9293
np.uint16: "GMT_USHORT",
9394
np.uint32: "GMT_UINT",
9495
np.uint64: "GMT_ULONG",
96+
np.ulonglong: "GMT_ULONG",
9597
np.float32: "GMT_FLOAT",
9698
np.float64: "GMT_DOUBLE",
9799
np.timedelta64: "GMT_LONG",
@@ -948,8 +950,9 @@ def put_vector(self, dataset: ctp.c_void_p, column: int, vector: np.ndarray):
948950
The dataset must be created by :meth:`pygmt.clib.Session.create_data` first with
949951
``family="GMT_IS_DATASET|GMT_VIA_VECTOR"``.
950952
951-
Not all numpy dtypes are supported, only: int8, int16, int32, int64, uint8,
952-
uint16, uint32, uint64, float32, float64, str\_, and datetime64.
953+
Not all numpy dtypes are supported, only: int8, int16, int32, int64, longlong,
954+
uint8, uint16, uint32, uint64, ulonglong, float32, float64, str\_, datetime64,
955+
and timedelta64.
953956
954957
.. warning::
955958
The numpy array must be C contiguous in memory. Use
@@ -1060,8 +1063,8 @@ def put_matrix(self, dataset: ctp.c_void_p, matrix: np.ndarray, pad: int = 0):
10601063
The dataset must be created by :meth:`pygmt.clib.Session.create_data` first with
10611064
``family="GMT_IS_DATASET|GMT_VIA_MATRIX"``.
10621065
1063-
Not all numpy dtypes are supported, only: int8, int16, int32, int64, uint8,
1064-
uint16, uint32, uint64, float32, and float64.
1066+
Not all numpy dtypes are supported, only: int8, int16, int32, int64, longlong,
1067+
uint8, uint16, uint32, uint64, ulonglong, float32, and float64.
10651068
10661069
.. warning::
10671070
The numpy array must be C contiguous in memory. Use

0 commit comments

Comments
 (0)