1. 25 Dec, 2018 4 commits
  2. 24 Dec, 2018 5 commits
  3. 21 Dec, 2018 4 commits
  4. 19 Dec, 2018 1 commit
  5. 28 Nov, 2018 1 commit
  6. 27 Nov, 2018 3 commits
  7. 26 Nov, 2018 1 commit
  8. 23 Nov, 2018 1 commit
  9. 22 Nov, 2018 3 commits
  10. 20 Nov, 2018 1 commit
  11. 30 Oct, 2018 1 commit
    • Kirill Smelkov's avatar
      Merge branch 'master' into t · e1f05973
      Kirill Smelkov authored
      * master:
        lib.xnumpy.structured: New utility to create structured view of an array
        bigarray: Factor-out our custom numpy.lib.stride_tricks.as_strided-alike into lib/xnumpy.py
      e1f05973
  12. 29 Oct, 2018 9 commits
    • Kirill Smelkov's avatar
      lib.xnumpy.structured: New utility to create structured view of an array · 32ca80e2
      Kirill Smelkov authored
      Structured creates view of the array interpreting its minor axis as fully covered by a dtype.
      
      It is similar to arr.view(dtype) + corresponding reshape, but does
      not have limitations of ndarray.view(). For example:
      
        In [1]: a = np.arange(3*3, dtype=np.int32).reshape((3,3))
      
        In [2]: a
        Out[2]:
        array([[0, 1, 2],
               [3, 4, 5],
               [6, 7, 8]], dtype=int32)
      
        In [3]: b = a[:2,:2]
      
        In [4]: b
        Out[4]:
        array([[0, 1],
               [3, 4]], dtype=int32)
      
        In [5]: dtxy = np.dtype([('x', np.int32), ('y', np.int32)])
      
        In [6]: dtxy
        Out[6]: dtype([('x', '<i4'), ('y', '<i4')])
      
        In [7]: b.view(dtxy)
        ---------------------------------------------------------------------------
        ValueError                                Traceback (most recent call last)
        <ipython-input-66-af98529aa150> in <module>()
        ----> 1 b.view(dtxy)
      
        ValueError: To change to a dtype of a different size, the array must be C-contiguous
      
        In [8]: structured(b, dtxy)
        Out[8]: array([(0, 1), (3, 4)], dtype=[('x', '<i4'), ('y', '<i4')])
      
      Structured always creates view and never copies data.
      
      Here is original context where separately playing with .shape and .dtype
      was not enough, since it was creating array copy and OOM'ing the machine:
      
      klaus/wendelin@cbe4938b
      32ca80e2
    • Kirill Smelkov's avatar
      bigarray: Factor-out our custom numpy.lib.stride_tricks.as_strided-alike into lib/xnumpy.py · 6a5dfefa
      Kirill Smelkov authored
      We are going to use this code in another place, so move this out to
      dommon place as a preparatory step first.
      
      On a related note: Since ArrayRef is generic and quite independent from
      BigArray (it only supports it, but equally it supports just other - e.g.
      plain arrays), the proper place for it might be also to be lib/xnumpy.py .
      We might get to this topic a bit later.
      6a5dfefa
    • Kirill Smelkov's avatar
      . · 33ff0c80
      Kirill Smelkov authored
      33ff0c80
    • Kirill Smelkov's avatar
      . · b4a3a0bd
      Kirill Smelkov authored
      b4a3a0bd
    • Kirill Smelkov's avatar
      . · c4b66f7d
      Kirill Smelkov authored
      c4b66f7d
    • Kirill Smelkov's avatar
      . · fd647f2b
      Kirill Smelkov authored
      fd647f2b
    • Kirill Smelkov's avatar
      . · 2ad300e8
      Kirill Smelkov authored
      2ad300e8
    • Kirill Smelkov's avatar
      Merge remote-tracking branch 'nxd/master' into t · 009b9fb9
      Kirill Smelkov authored
      * nxd/master:
        bigarray: RAMArray
        bigarray/tests: Factor out a way to spcify on which BigFile/BigFileH an array is tested into fixture parameter
      009b9fb9
    • Kirill Smelkov's avatar
  13. 26 Oct, 2018 1 commit
    • Kirill Smelkov's avatar
      X xnumpy.restructure · 2569b175
      Kirill Smelkov authored
      Currently fails with:
      
      /home/kirr/src/wendelin/wendelin.core/lib/xnumpy.py in restructure(arr, dtype)
           82     print 'stridev:', stridev
           83     #return np.ndarray.__new__(type(arr), shape, dtype, buffer(arr), 0, stridev)
      ---> 84     return np.ndarray(shape, dtype, buffer(arr), 0, stridev)
      
      TypeError: expected a single-segment buffer object
      2569b175
  14. 21 Oct, 2018 2 commits
  15. 19 Oct, 2018 3 commits