Skip to content
Snippets Groups Projects
Commit 18c8385d authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira
Browse files

Merge branch 'roc' into 'master'

Fix semilog plots for non numpy arrays

Closes bob.bio.base#117

See merge request !64
parents dc941439 39cb472c
Branches
Tags
1 merge request!64Fix semilog plots for non numpy arrays
Pipeline #
#!/usr/bin/env python #!/usr/bin/env python
# vim: set fileencoding=utf-8 : # vim: set fileencoding=utf-8 :
# Mon 23 May 2011 14:36:14 CEST # Mon 23 May 2011 14:36:14 CEST
import numpy
def log_values(min_step=-4, counts_per_step=4): def log_values(min_step=-4, counts_per_step=4):
...@@ -38,6 +39,7 @@ def log_values(min_step=-4, counts_per_step=4): ...@@ -38,6 +39,7 @@ def log_values(min_step=-4, counts_per_step=4):
def _semilogx(x, y, **kwargs): def _semilogx(x, y, **kwargs):
# remove points were x is 0 # remove points were x is 0
x, y = numpy.asarray(x), numpy.asarray(y)
zero_index = x == 0 zero_index = x == 0
x = x[~zero_index] x = x[~zero_index]
y = y[~zero_index] y = y[~zero_index]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment