home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 1543433057

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/pull/7834#issuecomment-1543433057 https://api.github.com/repos/pydata/xarray/issues/7834 1543433057 IC_kwDOAMm_X85b_uth 132147 2023-05-11T06:52:46Z 2023-05-11T06:52:46Z CONTRIBUTOR

Using latest xarray and numpy >= 1.24.0, the following code generates a warning. This function is called when saving datasets to disk using dataset.to_netcdf:

python import numpy as np from xarray.coding.times import cast_to_int_if_safe array = np.array([1., 2., np.nan]) cast_to_int_if_safe(array)

$HOME/projects/xarray/xarray/coding/times.py:619: RuntimeWarning: invalid value encountered in cast int_num = np.asarray(num, dtype=np.int64) array([ 1., 2., nan])

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  1705163672
Powered by Datasette · Queries took 0.735ms · About: xarray-datasette