Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/gnuplot.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkoray kavukcuoglu <koray@kavukcuoglu.org>2012-02-13 23:02:30 +0400
committerkoray kavukcuoglu <koray@kavukcuoglu.org>2012-02-13 23:02:30 +0400
commit669518434ee0062cd1d3ae05b2453adc981ff97c (patch)
tree4560b463d6addd25efb1d3aec7e2393e07db7a57
parentc7dd0c13452d2913a063f053736d7214bccd11b9 (diff)
fixed pretty print on histc
-rw-r--r--hist.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/hist.lua b/hist.lua
index 961c307..08f5dcc 100644
--- a/hist.lua
+++ b/hist.lua
@@ -101,8 +101,8 @@ function gnuplot.histc(...)
-- cleanup hist
local cleanhist = {}
cleanhist.raw = hist
- local mx = torch.max(cleanhist.raw)
- local mn = torch.min(cleanhist.raw)
+ local _,mx = torch.max(cleanhist.raw,1)
+ local _,mn = torch.min(cleanhist.raw,1)
cleanhist.bins = bins
cleanhist.binwidth = (max-min)/bins
for i = 1,bins do
@@ -110,8 +110,8 @@ function gnuplot.histc(...)
cleanhist[i].val = min + (i-0.5)*cleanhist.binwidth
cleanhist[i].nb = hist[i]
end
- cleanhist.max = mx
- cleanhist.min = mn
+ cleanhist.max = mx[1]
+ cleanhist.min = mn[1]
-- print function
setmetatable(cleanhist, {__tostring=histc__tostring})