title: 1D Number Array Clustering
body: <p>So let's say I have an array like this:</p>
  
  <pre><code>[1,1,2,3,10,11,13,67,71]
  </code></pre>
  
  <p>Is there a convenient way to partition the array into something like this?</p>
  
  <pre><code>[[1,1,2,3],[10,11,13],[67,71]]
  </code></pre>
  
  <p>I looked through similar questions yet most people suggested using k-means to cluster points, like <a href="http://docs.scipy.org/doc/scipy/reference/cluster.vq.html#" rel="noreferrer">scipy</a>, which is quite confusing to use for a beginner like me. Also I think that k-means is more suitable for two or more dimensional clustering right? Are there any ways to partition an array of N numbers to many partitions/clustering depending on the numbers?</p>
  
  <p>Some people also suggest rigid range partitioning, but it doesn't always render the results as
   expected</p>