# Histogram does not compute

I have a strange problem I haven´t had so far. I have a list of 16 lists of Integers and Rationals and want to show the 16 Histograms. Problem: The Histogram for the second list is not shown, the computations hangs. The other ones compute in less than a second. The lists are of lengths 450.000+ and all values are between 0 and 1 (they are Jaccard coefficients of sets). At the moment I have no idea what I can do further. I make the data public accessible (File "histogram.m") via the following dropbox link: histogram.m.

Enclosed a screenshot of my "investigations". By the method "trial and error" I found that the second list of data is normally processed (histogram computed at a moment ) up to element number 131073 (the corresponding value is 3/8), the values surrounding this element are all "looking normal", i.e. all rationals between 0 and 1. It would be great if anyone has a hint for me what the source of the problem is.

My machine: MacBookPro Late 2016, MacOS 10.12.6, Mathematica 11.1.1.0

Update:

The problems seems to reside in the way Histogramcomputes the bins. If I use Histogram[#,{0.1}]& everything is fine.

• Works for me. – C. E. Aug 5 '17 at 21:41
• @C.E.:Thank you for the fast response. I´m working on a MacBookPro Late 2016, latest OS, Mathematica 11.1.1.0 – mgamer Aug 5 '17 at 21:50
• I can reproduce the problem in Mathematica 11.1. Wrapping the list in Sort seems to resolve the problem, whatever it is. – C. E. Aug 5 '17 at 22:13
• @C.E.: Thank you for this workaround ("Sort" I hadn't in my mind ;-) ) I´ll try this out immediately – mgamer Aug 5 '17 at 22:26
• @C.E.In 11.1.1. Solve does not solve ( ;-) ) the problem. As a first step I´m going to report this to WR – mgamer Aug 5 '17 at 23:12

I reported this to Wolfram at 2017-09-20 and got the following answer:

"Thank you for providing the condensed information. I verified and confirmed that your issue was present in version 11.1.1. However, the issue has been resolved in version 11.2 as demonstrated in the attached notebook. Please install the latest 11.2 version and check if the issue persists for Histogram with your data."

Now in the "new" version 11.2 everything is fine. No problems so far

Maybe not a solution to your problem (I am not able to replicate it with Mathematica 11.0.1 under macos 10.12.6 on a Macbook Pro 2015), but this may still be helpful:

Your data will be processed much faster if you turn it into a list of PackedArrays of Reals:

a = Import["histogram.m"];
b = DeveloperToPackedArray@*N /@ a;
Histogram[a[[2]]] // AbsoluteTiming // First
Histogram[b[[2]]] // AbsoluteTiming // First


On my machine, this yields the following timings:

(* 1.23312 *)
(* 0.069292 *)

• @Henrk Schumacher: Good for performance: list = DeleteCases[Range@16, 2] and Histogram /@ b[[list]] runs 0.75 seconds. But b[[2]]` can still not be calculated. – mgamer Aug 6 '17 at 7:14