1. 08 Feb, 2016 1 commit
  2. 07 Jan, 2016 1 commit
  3. 08 Dec, 2015 2 commits
    • Brad King's avatar
      Drop support for compilers without `long long` · 3b89e771
      Brad King authored
      VTK no longer supports any compilers that do not provide this type.
      Therefore all code conditional on VTK_TYPE_USE_LONG_LONG can be made
      unconditional.  Leave the macro defined to tell dependent projects that
      APIs using the type are available in case they still support versions of
      VTK that make it conditional.
    • Brad King's avatar
      Drop support for compilers with `__int64` as the only 64-bit int · 36bb09a7
      Brad King authored
      VTK no longer supports any compilers that have `__int64` but not a
      `long` or `long long` that is 64-bit.  Therefore all code that is
      conditional on VTK_TYPE_USE___INT64 is never used and can be dropped.
  4. 30 Oct, 2015 1 commit
  5. 08 Oct, 2015 1 commit
    • David Gobbi's avatar
      Relative import is required for installed VTK. · 25d44596
      David Gobbi authored
      The Python vtk module was failing to import the installed extension
      modules with Python 3, because relative imports now require a leading
      ".".   This problem did not show up on the dashboard, because the
      dash builds run their tests on the build directory (where the vtkpython
      executable has a baked-in PYTHONPATH) but not on the installed programs
      and modules.
      The try/except used in this patch is not an ideal solution, and I would
      rather that the extension modules were placed in Wrapping/Python/vtk/
      during the build, but the required Build/Debug subdirs for Visual Studio
      make that impossible.
  6. 12 Sep, 2015 2 commits
  7. 11 Sep, 2015 1 commit
  8. 10 Sep, 2015 2 commits
  9. 05 Sep, 2015 3 commits
  10. 23 Aug, 2015 1 commit
  11. 11 Aug, 2015 2 commits
    • David Gobbi's avatar
      Fix remaining py3k issues with vtk.tk module. · aa4e0d02
      David Gobbi authored
      Two major changes: 1) the vtkLoadPythonTkWidgets utility module is now
      imported explicitly as a relative module, necessitating absolute_import.
      The alternative is to import it as vtk.tk.vtkLoadPythonTkWidgets, which
      makes the tk module less mobile, in case someone wanted to incorporate it
      or the vtk module itself into a larger package (e.g. what paraview does).
      2) I've explicitly added an "if" check for python3 before importing the
      tkinter module.  This is done to ensure that an appropriate error is
      reported if the module fails to load (i.e. so that it won't complain
      about trying to import "tkinter" on Python 2, just because it had a
      fallthrough on an attemp to import "Tkinter".
    • Andrew Maclean's avatar
      Fixing tests for Python3. · ae48313c
      Andrew Maclean authored and David Gobbi's avatar David Gobbi committed
  12. 10 Aug, 2015 1 commit
    • David Gobbi's avatar
      Add a python function to check buffer equivalence. · 8320da24
      David Gobbi authored
      The python "buffer" and "memoryview" objects do not expose the pointer
      to the underlying memory, they only expose the contents of the memory.
      Likewise, if you check (buffer1 == buffer2) within python, then python
      will iterate through both buffers to see if they have the same contents!
      After all, for python, that's how equality is defined for sequence types.
      This commit adds a method called buffer_shared(ob1, ob2) that checks to
      see if two objects (e.g. arrays) expose the same block of memory via
      their buffer interface.  It assumes that the "buf" pointer is the lowest
      address of the buffer (i.e. the strides must be non-negative).
      It also adds two changes to dataset_adapter.py:
      1) The adapter now uses buffer_shared() instead of using "==" to compare
      buffers, because as stated above "==" does the wrong thing.
      2) It repairs an infinite recursion where __getattr__ called hasattr().
      The infinite recursion was caught silently by hasattr() itself in python2,
      but is exposed as a RuntimeError in python3.
  13. 07 Aug, 2015 3 commits
  14. 06 Aug, 2015 2 commits
    • David Gobbi's avatar
      Patch CommonCore python tests for py3k. · b7308b03
      David Gobbi authored
      This change modifies the python code for the tests so that they are
      cross-compatible between python 2 and python 3.  The new code will not
      run on Python 2.5 or earlier, because only python 2.6 and 2.7 allow
      py3k-friendly syntax.
      The numpy_interface does not fully support python 3 yet, due to changes
      in the way numeric operators work and the way type coercion is done.
    • David Gobbi's avatar
      Make vtk/__init__.py compatible with py3k. · c96458b9
      David Gobbi authored
  15. 02 Jul, 2015 1 commit
  16. 11 Mar, 2015 1 commit
    • Scott Wittenburg's avatar
      Fix how we import our argparse fallback implementation. · 566dc51f
      Scott Wittenburg authored
      In environments where Python 2.6 is still in use, there is no
      argparse module included by default.  For these situations, we
      have included our own copy, called _argparse.py, which we usually
      import in the except block in case the default is not present.  At
      some point, the vtk.web package included this file, but at some
      point it was removed and because few sites still use Python 2.6,
      it was not caught.
      This fix puts the _argparse.py in a single location (except for
      where it is needed at build time).  This location is vtk.util,
      and everything now looks there in the fallback case.
      Change-Id: Id64241ffbe4e3cec7e96dae386da1a6385c5f6ed
  17. 05 Feb, 2015 1 commit
  18. 09 Jan, 2015 1 commit
  19. 28 Dec, 2014 1 commit
    • Dan Lipsa's avatar
      BUG: Account for gradient G + mean(G,0) · ed860dc2
      Dan Lipsa authored
      If G is a gradient array G.shape = (n,3) we have that
      mean(G,0).shape = (3,). Appending 1s to the second array
      would result in a broadcast error, so we do not do it in
      this case.
      Change-Id: I7c46e1c0c4159c40511a221797487b27438cb079
  20. 24 Dec, 2014 1 commit
    • Dan Lipsa's avatar
      Reshape VTKArrays so that they can be combined through operators. · 193be6ad
      Dan Lipsa authored
      An array G of shape (n,3) resulted from computing the
      gradient on a scalar array S of shape (n,) cannot be added together without
      G + expand_dims(S,1) works,
      G + S gives an error:
      ValueError: operands could not be broadcast together with shapes (n,3) (n,)
      This commit performs this reshape operation automatically by appending 1s
      to the dimensions of the array with fewer dimensions.
      Change-Id: I0a0eaeecf5063fac1c8b71b9d32472bbc41d42c8
  21. 10 Dec, 2014 1 commit
  22. 13 Nov, 2014 1 commit
  23. 12 Nov, 2014 3 commits
  24. 07 Nov, 2014 1 commit
    • Ben Boeckel's avatar
      numpy_support: support using dtype array types · a400d836
      Ben Boeckel authored
      Arrays can have a type of dtype('int32') which is not an actual instance
      of a numpy array type, but the builtin types can be converted to a
      dtype and compared. Now arrays of type dtype('int32') are caught as
      vtk.VTK_INT since dtype(numpy.int32) is dtype('int32').
      Also change the query around to using a single for loop over the items
      in the dictionary rather than a possible exception raising with a for
      loop fallback.
      Change-Id: Id9b24b3675b0ce50f7401e4ed6f4f42e9e2d1c2c
  25. 31 Oct, 2014 2 commits
  26. 06 Oct, 2014 1 commit
    • David Gobbi's avatar
      14999: Python Tk widgets fail to load on Tcl 8.6. · cc5740c8
      David Gobbi authored
      The tcl 8.6 "info loaded" command returns a nested list of loaded
      tcl modules.  In python, these are returned as nested tuples (if
      there is at least one), or as an empty string (if there are none).
      Both situations are now handled, as well as the tcl 8.5 behaviour
      in which the results are always returned as a string.
      This supersedes commit 9f4afe40, which returned a false negative
      because it mistakenly assumed that "info loaded" returned a flat list.
      Tested with tcl 8.5 and tcl 8.6 with python 2.7 on linux.
      Change-Id: Ic9aa3b59fb141bd0bcf5e8f12106173fb1fc4c5b
  27. 03 Oct, 2014 1 commit
    • David Gobbi's avatar
      12098: Mangle void_p like other swig pointers. · e12eb1f4
      David Gobbi authored
      When vtk-python returns a "void *", it passes it as a swig-style
      pointer string _0acd876f_void_p which was valid for swig 1.0, but
      modern swig requires _0acd876f_p_void instead.
      Change-Id: Ic58e66581b7bc56c04e91ec0060b63a8c8e4e445
  28. 30 Sep, 2014 1 commit