home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 1254985357

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/issues/7065#issuecomment-1254985357 https://api.github.com/repos/pydata/xarray/issues/7065 1254985357 IC_kwDOAMm_X85KzY6N 12760310 2022-09-22T12:56:35Z 2022-09-22T12:56:35Z NONE

Sorry, that brings me to another question that I never even considered.

As my latitude and longitude arrays in both datasets have a resolution of 0.1 degrees, wouldn't it make sense to use np.float16 for both arrays?

From this dataset I'm extracting the closest points to a station inside a user-defined radius, doing something similar to

python ds['distances'] = haversine(station['lon'], station['lat'], ds.lon, ds.lat) # haversine is the haversine distance nearest = ds.where(distances < 20, drop=True).copy() In theory, using a 16 bit precision for the longitude and latitude arrays shouldn't change much, as the original coordinates are not supposed to have more than 0.1 precision, but the final results are still quite different...

The thing is, if I use float16 I can bring the computation time from 6-7 seconds to 2 seconds.

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