Repository navigation
Let pygmt.info load datetime columns into a str dtype array - #960
Conversation
Fixes problem with pygmt.info not being able to handle datetime64 inputs. I.e. `ValueError: could not convert string to float: '2021-01-01T12:34:56'` However, users will still need to use`pygmt.info(..., f="0T")` until upstream issue at GenericMappingTools/gmt#4241 is resolved. Also added two extra unit tests using numpy datetime64 types.
Used to specify data types of input and/or output columns (time or geographical data). See also: - https://docs.generic-mapping-tools.org/6.1/gmt.html#f-full - https://github.com/GenericMappingTools/gmt/blob/6.1.1/doc/rst/source/explain_-f.rst_ - https://github.com/GenericMappingTools/gmt/blob/master/doc/rst/source/explain_-f_full.rst_ - https://docs.generic-mapping-tools.org/6.1/cookbook/options.html#data-type-selection-the-f-option Needed for the workaround datetime bugfix at #960
Used to specify data types of input and/or output columns (time or geographical data). See also: - https://docs.generic-mapping-tools.org/6.1/gmt.html#f-full - https://github.com/GenericMappingTools/gmt/blob/6.1.1/doc/rst/source/explain_-f.rst_ - https://github.com/GenericMappingTools/gmt/blob/master/doc/rst/source/explain_-f_full.rst_ - https://docs.generic-mapping-tools.org/6.1/cookbook/options.html#data-type-selection-the-f-option Needed for the workaround datetime bugfix at #960
|
Hmm, that crash on the Windows GMT dev test at https://github.com/GenericMappingTools/pygmt/runs/2025836161?check_suite_focus=true#step:15:86 at the start (before any tests got run) doesn't look nice. |
|
/test-gmt-dev
It may be just a sporadic crash. Just re-triggered the dev tests. |
|
Thanks! Windows tests have passed at https://github.com/GenericMappingTools/pygmt/runs/2026019634?check_suite_focus=true#step:15:867. Any other comment on this PR? |
…MappingTools#994) Used to specify data types of input and/or output columns (time or geographical data). See also: - https://docs.generic-mapping-tools.org/6.1/gmt.html#f-full - https://github.com/GenericMappingTools/gmt/blob/6.1.1/doc/rst/source/explain_-f.rst_ - https://github.com/GenericMappingTools/gmt/blob/master/doc/rst/source/explain_-f_full.rst_ - https://docs.generic-mapping-tools.org/6.1/cookbook/options.html#data-type-selection-the-f-option Needed for the workaround datetime bugfix at GenericMappingTools#960
…appingTools#960) Fixes problem with pygmt.info not being able to handle datetime64 inputs. I.e. `ValueError: could not convert string to float: '2021-01-01T12:34:56'` However, users will still need to use`pygmt.info(..., coltypes="0T")` until upstream issue at GenericMappingTools/gmt#4241 is resolved. Also added two extra unit tests using numpy datetime64 types. * Use common alias coltypes (f) in tests and make a note on the workaround
Description of proposed changes
Fixes problem with pygmt.info not being able to handle datetime64 inputs. I.e.
ValueError: could not convert string to float: '2021-01-01T12:34:56'.However, users will still need to use
pygmt.info(..., f="0T")until upstream issue at GenericMappingTools/gmt#4241 is resolved. Something like so:Also added two extra unit tests using numpy datetime64 types.
References:
Addresses #597 on the pygmt side using fix mentioned in #597 (comment). Assuming that GenericMappingTools/gmt#4241 is fixed in GMT 6.2.0, then issue #597 can be closed once PyGMT bumps minimum required GMT version to 6.2.0.
Reminders
make formatandmake checkto make sure the code follows the style guide.doc/api/index.rst.Slash Commands
You can write slash commands (
/command) in the first line of a comment to performspecific operations. Supported slash commands are:
/format: automatically format and lint the code/test-gmt-dev: run full tests on the latest GMT development version