1. 12 Jul, 2019 1 commit
    • Kirill Smelkov's avatar
      *: Use defer for dbclose & friends · 5c8340d2
      Kirill Smelkov authored
      For tests this makes sure that if one test fails, it won't make following
      tests fail just because the next test will fail trying to lock test database.
      
      For regular code (demo_zbigarray.py) this is also a good thing to do -
      to always close the database irregardless of whether an exception was
      raised before program reached end of main.
      
      Pygolang becomes regular - not test only - dependency. Being regular
      dependency is currently required only by demo_zbigarray.py, but it will
      be also used in upcoming wcfs, so adding pygolang into wendelin.core
      dependencies aligns with the plan.
      
      dbclose now uses defer almost everywhere - there are still few places in
      tests, where one test function is opening/closing test database multiple
      times - those were not (yet ?) converted.
      5c8340d2
  2. 01 Dec, 2017 1 commit
  3. 04 Sep, 2017 1 commit
    • Kirill Smelkov's avatar
      demo_zbigarray: Allow to specify work size as option · 38fbc83c
      Kirill Smelkov authored
      Since the beginning (1ee72371 "Demo program that shows how to work with
      ZBigArrays bigger than RAM in size") the work size was 2*RAM.
      
      However sometimes for demonstration purposes it could be handy to set it
      to be even more (e.g.  16*RAM) or vise versa - to something lower.
      
      So add command line option to do so instead of manually patching sources
      every time.
      38fbc83c
  4. 02 Oct, 2015 1 commit
  5. 25 Jun, 2015 1 commit
  6. 03 Apr, 2015 1 commit
    • Kirill Smelkov's avatar
      Demo program that shows how to work with ZBigArrays bigger than RAM in size · 1ee72371
      Kirill Smelkov authored
      This shows how to first generate such arrays (in steps, as every
      transaction change should fit in memory), and then gather data from
      whole array using C/Fortran/etc code.
      
      It shows how to compute mean via NumPy's ndarray.mean()
      
      It also shows that e.g. ndarray.var() wants to create temporaries in
      size of original ndarray and that would fail, because it does not fit
      into RAM.
      
      ndarray.var() should not need to create such temporaries in principle -
      all it has to do is to first compute mean, and then compute
      
          sum (Xi - <X>)^2
      
      in a loop.
      
      <X> is scalar, Xi - is just access to original array.
      
      ~~~~
      
      So this also show NumPy can be incrementally improved to avoid creating
      such temporaries, and then it will work.
      1ee72371