question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"fill_value" missed from current API

See original GitHub issue

First congratulations @rusty1s for merging torch-scatter into pytorch master. I noticed that the fill_value param is missed from the current API, so what’s their default values now for different reduction method (max, min, mean, add)?

I ask because the previous default fill_value for max and min reduction methods are not appropriate (numpy.finfo(numpy.float32).max and numpy.finfo(numpy.float32).min) for me. I’d prefer them set to zero in my case.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
gasteigerjocommented, Apr 24, 2020

Okay, I’ll just write a wrapper for that and then all will be good again in my code world. 😉

Thank you!

0reactions
gasteigerjocommented, May 8, 2020

I went with

mask = ptr[1:] == ptr[:-1]
out[mask] = fill_value

Which works, but it’s slower than segment_coo. So I’ll just stick with that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

NetCDF: Fill Values - Unidata Software Documentation
Sometimes there are missing values in the data, and some value is needed to ... “_FillValue” that contains a value that you have...
Read more >
difference between netcdf4 _FillValue, missing_value, and ...
I have netcdf files where _FillValue and/or missing value are set in various combinations (e.g. as float, string, or not at all, ...
Read more >
Need better user control of _FillValue attribute in NetCDF files
This issue is under discussion here: #1165. It is not desirable for us to have _FillValue = NaN for dimensions and coordinate variables....
Read more >
Working with missing data — pandas 1.5.2 documentation
Cleaning / filling missing data​​ pandas objects are equipped with various data manipulation methods for dealing with missing data.
Read more >
netCDF4 API documentation
By default, netcdf4-python returns numpy masked arrays with values equal to the missing_value or _FillValue variable attributes masked for ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found