home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 451984471

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/2304#issuecomment-451984471 https://api.github.com/repos/pydata/xarray/issues/2304 451984471 MDEyOklzc3VlQ29tbWVudDQ1MTk4NDQ3MQ== 971382 2019-01-07T16:04:11Z 2019-01-07T16:04:11Z NONE

Hi, thank you for your effort into making xarray a great library. As mentioned in the issue the discussion went on a PR in order to make xr.open_dataset parametrable. This post is about asking you about recommendations regarding our PR.

In this case we would add a parameter to the open_dataset function called "force_promote" which is a boolean and False by default and thus not mandatory. And then spread that parameter down to the function maybe_promote in dtypes.py Where we say the following:

if dtype.itemsize <= 2 and not force_promote: dtype = np.float32 else: dtype = np.float64

The downside of that is that we somehow pollute the code with a parameter that is used in a specific case.

The second approach would check the value of an environment variable called "XARRAY_FORCE_PROMOTE" if it exists and set to true would force promoting type to float64.

please tells us which approach suits best your vision of xarray.

Regards.

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