Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NaN behaviour #18

Open
cfedk opened this issue Feb 4, 2016 · 0 comments
Open

NaN behaviour #18

cfedk opened this issue Feb 4, 2016 · 0 comments

Comments

@cfedk
Copy link

cfedk commented Feb 4, 2016

There is inconsistent behaviour when plotting NaN values vs Inf values:

require 'gnuplot'
a=torch.rand(5)
a[2] = 0/0
a[4] = 1/0
gnuplot.plot(a)
gnuplot.axis({0,5,0,2})

This produces the following:

untitled

The item at a[4] (Inf) is not drawn. That's great. However, the item at a[2] (NaN) is drawn - but at x=1. When plotting any NaN value a[i]=NaN, this will be plotted as (x,y) = (i-1,i), which is weird.

Of course this is not a major problem - let's concentrate on fixing the code that's producing NaN! - but it is an oddity to be aware of I think. Perhaps this is well known behaviour in gnuplot, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant