@@ -1001,31 +1001,30 @@ def put_vector(self, dataset: ctp.c_void_p, column: int, vector: np.ndarray):
1001
1001
1002
1002
def put_strings (self , dataset : ctp .c_void_p , family : str , strings : np .ndarray ):
1003
1003
"""
1004
- Attach a numpy 1-D array of dtype str as a column on a GMT dataset.
1004
+ Attach a 1-D numpy array of dtype str as a column on a GMT dataset.
1005
1005
1006
- Use this function to attach string type numpy array data to a GMT
1007
- dataset and pass it to GMT modules. Wraps ``GMT_Put_Strings``.
1006
+ Use this function to attach string type numpy array data to a GMT dataset and
1007
+ pass it to GMT modules. Wraps ``GMT_Put_Strings``.
1008
1008
1009
- The dataset must be created by :meth:`pygmt.clib.Session.create_data`
1010
- first.
1009
+ The dataset must be created by :meth:`pygmt.clib.Session.create_data` first.
1011
1010
1012
1011
.. warning::
1013
- The numpy array must be C contiguous in memory. If it comes from a
1014
- column slice of a 2-D array, for example, you will have to make a
1015
- copy. Use :func:`numpy.ascontiguousarray` to make sure your vector
1016
- is contiguous (it won't copy if it already is).
1012
+ The numpy array must be C contiguous in memory. If it comes from a column
1013
+ slice of a 2-D array, for example, you will have to make a copy. Use
1014
+ :func:`numpy.ascontiguousarray` to make sure your vector is contiguous (it
1015
+ won't copy if it already is).
1017
1016
1018
1017
Parameters
1019
1018
----------
1020
- dataset : :class:`ctypes.c_void_p`
1021
- The ctypes void pointer to a ``GMT_Dataset``. Create it with
1022
- :meth:`pygmt.clib.Session.create_data`.
1023
- family : str
1019
+ dataset
1020
+ The ctypes void pointer to a ``GMT_VECTOR``/``GMT_MATRIX`` data container.
1021
+ Create it with :meth:`pygmt.clib.Session.create_data`.
1022
+ family
1024
1023
The family type of the dataset. Can be either ``GMT_IS_VECTOR`` or
1025
1024
``GMT_IS_MATRIX``.
1026
- strings : numpy 1-D array
1027
- The array that will be attached to the dataset. Must be a 1-D C
1028
- contiguous array.
1025
+ strings
1026
+ The array that will be attached to the dataset. Must be a 1-D C contiguous
1027
+ array.
1029
1028
1030
1029
Raises
1031
1030
------
0 commit comments