@@ -171,7 +171,7 @@ def __enter__(self):
171
171
"""
172
172
Create a GMT API session and check the libgmt version.
173
173
174
- Calls :meth:`~gmt .clib.Session.create`.
174
+ Calls :meth:`pygmt .clib.Session.create`.
175
175
176
176
Raises
177
177
------
@@ -197,7 +197,7 @@ def __exit__(self, exc_type, exc_value, traceback):
197
197
"""
198
198
Destroy the currently open GMT API session.
199
199
200
- Calls :meth:`~gmt .clib.Session.destroy`.
200
+ Calls :meth:`pygmt .clib.Session.destroy`.
201
201
"""
202
202
self .destroy ()
203
203
@@ -296,10 +296,10 @@ def create(self, name):
296
296
297
297
.. warning::
298
298
299
- Usage of :class:`~gmt .clib.Session` as a context manager in a
299
+ Usage of :class:`pygmt .clib.Session` as a context manager in a
300
300
``with`` block is preferred over calling
301
- :meth:`~gmt .clib.Session.create` and
302
- :meth:`~gmt .clib.Session.destroy` manually.
301
+ :meth:`pygmt .clib.Session.create` and
302
+ :meth:`pygmt .clib.Session.destroy` manually.
303
303
304
304
Calls ``GMT_Create_Session`` and generates a new ``GMTAPI_CTRL``
305
305
struct, which is a :class:`ctypes.c_void_p` pointer. Sets the
@@ -387,10 +387,10 @@ def destroy(self):
387
387
388
388
.. warning::
389
389
390
- Usage of :class:`~gmt .clib.Session` as a context manager in a
390
+ Usage of :class:`pygmt .clib.Session` as a context manager in a
391
391
``with`` block is preferred over calling
392
- :meth:`~gmt .clib.Session.create` and
393
- :meth:`~gmt .clib.Session.destroy` manually.
392
+ :meth:`pygmt .clib.Session.create` and
393
+ :meth:`pygmt .clib.Session.destroy` manually.
394
394
395
395
Calls ``GMT_Destroy_Session`` to terminate and free the memory of a
396
396
registered ``GMTAPI_CTRL`` session (the pointer for this struct is
@@ -631,15 +631,16 @@ def _parse_constant(self, constant, valid, valid_modifiers=None):
631
631
632
632
If valid modifiers are not given, then will assume that modifiers are
633
633
not allowed. In this case, will raise a
634
- :class:`~gmt.exceptions.GMTInvalidInput` exception if given a modifier.
634
+ :class:`pygmt.exceptions.GMTInvalidInput` exception if given a
635
+ modifier.
635
636
636
637
Parameters
637
638
----------
638
639
constant : str
639
640
The name of a valid GMT API constant, with an optional modifier.
640
641
valid : list of str
641
642
A list of valid values for the constant. Will raise a
642
- :class:`~gmt .exceptions.GMTInvalidInput` exception if the given
643
+ :class:`pygmt .exceptions.GMTInvalidInput` exception if the given
643
644
value is not on the list.
644
645
"""
645
646
parts = constant .split ("|" )
@@ -739,7 +740,7 @@ def put_vector(self, dataset, column, vector):
739
740
Use this function to attach numpy array data to a GMT dataset and pass
740
741
it to GMT modules. Wraps ``GMT_Put_Vector``.
741
742
742
- The dataset must be created by :meth:`~gmt .clib.Session.create_data`
743
+ The dataset must be created by :meth:`pygmt .clib.Session.create_data`
743
744
first. Use ``family='GMT_IS_DATASET|GMT_VIA_VECTOR'``.
744
745
745
746
Not at all numpy dtypes are supported, only: float64, float32, int64,
@@ -755,7 +756,7 @@ def put_vector(self, dataset, column, vector):
755
756
----------
756
757
dataset : :class:`ctypes.c_void_p`
757
758
The ctypes void pointer to a ``GMT_Dataset``. Create it with
758
- :meth:`~gmt .clib.Session.create_data`.
759
+ :meth:`pygmt .clib.Session.create_data`.
759
760
column : int
760
761
The column number of this vector in the dataset (starting from 0).
761
762
vector : numpy 1d-array
@@ -802,7 +803,7 @@ def put_strings(self, dataset, family, strings):
802
803
Use this function to attach string type numpy array data to a GMT
803
804
dataset and pass it to GMT modules. Wraps ``GMT_Put_Strings``.
804
805
805
- The dataset must be created by :meth:`~gmt .clib.Session.create_data`
806
+ The dataset must be created by :meth:`pygmt .clib.Session.create_data`
806
807
first.
807
808
808
809
.. warning::
@@ -815,7 +816,7 @@ def put_strings(self, dataset, family, strings):
815
816
----------
816
817
dataset : :class:`ctypes.c_void_p`
817
818
The ctypes void pointer to a ``GMT_Dataset``. Create it with
818
- :meth:`~gmt .clib.Session.create_data`.
819
+ :meth:`pygmt .clib.Session.create_data`.
819
820
family : str
820
821
The family type of the dataset. Can be either ``GMT_IS_VECTOR`` or
821
822
``GMT_IS_MATRIX``.
@@ -862,7 +863,7 @@ def put_matrix(self, dataset, matrix, pad=0):
862
863
Use this function to attach numpy array data to a GMT dataset and pass
863
864
it to GMT modules. Wraps ``GMT_Put_Matrix``.
864
865
865
- The dataset must be created by :meth:`~gmt .clib.Session.create_data`
866
+ The dataset must be created by :meth:`pygmt .clib.Session.create_data`
866
867
first. Use ``|GMT_VIA_MATRIX'`` in the family.
867
868
868
869
Not at all numpy dtypes are supported, only: float64, float32, int64,
@@ -877,7 +878,7 @@ def put_matrix(self, dataset, matrix, pad=0):
877
878
----------
878
879
dataset : :class:`ctypes.c_void_p`
879
880
The ctypes void pointer to a ``GMT_Dataset``. Create it with
880
- :meth:`~gmt .clib.Session.create_data`.
881
+ :meth:`pygmt .clib.Session.create_data`.
881
882
matrix : numpy 2d-array
882
883
The array that will be attached to the dataset. Must be a 2d C
883
884
contiguous array.
@@ -910,7 +911,7 @@ def write_data(self, family, geometry, mode, wesn, output, data):
910
911
Write a GMT data container to a file.
911
912
912
913
The data container should be created by
913
- :meth:`~gmt .clib.Session.create_data`.
914
+ :meth:`pygmt .clib.Session.create_data`.
914
915
915
916
Wraps ``GMT_Write_Data`` but only allows writing to a file. So the
916
917
``method`` argument is omitted.
@@ -936,7 +937,7 @@ def write_data(self, family, geometry, mode, wesn, output, data):
936
937
The output file name.
937
938
data : :class:`ctypes.c_void_p`
938
939
Pointer to the data container created by
939
- :meth:`~gmt .clib.Session.create_data`.
940
+ :meth:`pygmt .clib.Session.create_data`.
940
941
941
942
Raises
942
943
------
@@ -981,7 +982,7 @@ def open_virtual_file(self, family, geometry, direction, data):
981
982
982
983
GMT uses a virtual file scheme to pass in data to API modules. Use it
983
984
to pass in your GMT data structure (created using
984
- :meth:`~gmt .clib.Session.create_data`) to a module that expects an
985
+ :meth:`pygmt .clib.Session.create_data`) to a module that expects an
985
986
input or output file.
986
987
987
988
Use in a ``with`` block. Will automatically close the virtual file when
@@ -1096,9 +1097,9 @@ def virtualfile_from_vectors(self, *vectors):
1096
1097
virtual file upon exit of the ``with`` block.
1097
1098
1098
1099
Use this instead of creating the data container and virtual file by
1099
- hand with :meth:`~gmt .clib.Session.create_data`,
1100
- :meth:`~gmt .clib.Session.put_vector`, and
1101
- :meth:`~gmt .clib.Session.open_virtual_file`.
1100
+ hand with :meth:`pygmt .clib.Session.create_data`,
1101
+ :meth:`pygmt .clib.Session.put_vector`, and
1102
+ :meth:`pygmt .clib.Session.open_virtual_file`.
1102
1103
1103
1104
If the arrays are C contiguous blocks of memory, they will be passed
1104
1105
without copying to GMT. If they are not (e.g., they are columns of a 2D
@@ -1206,12 +1207,12 @@ def virtualfile_from_matrix(self, matrix):
1206
1207
1207
1208
**Not meant for creating ``GMT_GRID``**. The grid requires more
1208
1209
metadata than just the data matrix. Use
1209
- :meth:`~gmt .clib.Session.virtualfile_from_grid` instead.
1210
+ :meth:`pygmt .clib.Session.virtualfile_from_grid` instead.
1210
1211
1211
1212
Use this instead of creating the data container and virtual file by
1212
- hand with :meth:`~gmt .clib.Session.create_data`,
1213
- :meth:`~gmt .clib.Session.put_matrix`, and
1214
- :meth:`~gmt .clib.Session.open_virtual_file`
1213
+ hand with :meth:`pygmt .clib.Session.create_data`,
1214
+ :meth:`pygmt .clib.Session.put_matrix`, and
1215
+ :meth:`pygmt .clib.Session.open_virtual_file`
1215
1216
1216
1217
The matrix must be C contiguous in memory. If it is not (e.g., it is a
1217
1218
slice of a larger array), the array will be copied to make sure it is.
@@ -1288,9 +1289,9 @@ def virtualfile_from_grid(self, grid):
1288
1289
metadata.
1289
1290
1290
1291
Use this instead of creating a data container and virtual file by hand
1291
- with :meth:`~gmt .clib.Session.create_data`,
1292
- :meth:`~gmt .clib.Session.put_matrix`, and
1293
- :meth:`~gmt .clib.Session.open_virtual_file`
1292
+ with :meth:`pygmt .clib.Session.create_data`,
1293
+ :meth:`pygmt .clib.Session.put_matrix`, and
1294
+ :meth:`pygmt .clib.Session.open_virtual_file`
1294
1295
1295
1296
The grid data matrix must be C contiguous in memory. If it is not
1296
1297
(e.g., it is a slice of a larger array), the array will be copied to
0 commit comments