[matplotlib-devel] Interpolation in a triangular mesh (tri.Triangulation)

2012-10-28 Thread GBillotey
   Hi!


I had recently to develop interpolators for a function defined at the nodes
of a user-specified triangular mesh.
(Beside interpolation, it can help producing higher-quality tricontour
plots, using interpolation on a refined mesh and matplotlib tricontour
function.)

Being a regular user of matplotlib, I would be happy if it can be useful to
others...
The code is hosted here:
https://github.com/GBillotey/trimesh-interpolator.git


Please let me know if it this dev. can be useful and if the code needs some
cleaning (I am not a computer scientist, only a mechanical engineer)


Cheers,
Geoffroy.





--
View this message in context: 
http://matplotlib.1069221.n5.nabble.com/Interpolation-in-a-triangular-mesh-tri-Triangulation-tp39586.html
Sent from the matplotlib - devel mailing list archive at Nabble.com.

--
WINDOWS 8 is here. 
Millions of people.  Your app in 30 days.
Visit The Windows 8 Center at Sourceforge for all your go to resources.
http://windows8center.sourceforge.net/
join-generation-app-and-make-money-coding-fast/
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] Test Failure: AttributeError: incompatible shape for a non-contiguous array

2012-10-28 Thread Patrick Marsh
Greetings,

I've banged my head against this problem for 2 days and have given up on
figuring it out on my own…

After updating numpy and matplotlib to the latest versions from github
Saturday morning, I keep getting "AttributeError: incompatible shape for a
non-contiguous array" errors all over the place when plotting. When I run
tests on numpy, everything passes. When I run tests on matplotlib, I get 51
errors, with a vast majority of them (possibly all) being the
non-contiguous array errors. (Sample below)

Any suggestions here? I'm totally stumped.


PTM







--
Traceback (most recent call last):
  File
"/home/Patrick.Marsh/.local/lib/python2.7/site-packages/nose-1.2.1-py2.7.egg/nose/case.py",
line 197, in runTest
self.test(*self.arg)
  File
"/home/Patrick.Marsh/.local/lib/python2.7/site-packages/matplotlib/testing/decorators.py",
line 39, in failer
result = f(*args, **kwargs)
  File
"/home/Patrick.Marsh/.local/lib/python2.7/site-packages/matplotlib/testing/decorators.py",
line 145, in do_test
figure.savefig(actual_fname)
  File
"/home/Patrick.Marsh/.local/lib/python2.7/site-packages/matplotlib/figure.py",
line 1363, in savefig
self.canvas.print_figure(*args, **kwargs)
  File
"/home/Patrick.Marsh/.local/lib/python2.7/site-packages/matplotlib/backend_bases.py",
line 2118, in print_figure
**kwargs)
  File
"/home/Patrick.Marsh/.local/lib/python2.7/site-packages/matplotlib/backend_bases.py",
line 1894, in print_svg
return svg.print_svg(*args, **kwargs)
  File
"/home/Patrick.Marsh/.local/lib/python2.7/site-packages/matplotlib/backends/backend_svg.py",
line 1103, in print_svg
return self._print_svg(filename, svgwriter, fh_to_close, **kwargs)
  File
"/home/Patrick.Marsh/.local/lib/python2.7/site-packages/matplotlib/backends/backend_svg.py",
line 1139, in _print_svg
self.figure.draw(renderer)
  File
"/home/Patrick.Marsh/.local/lib/python2.7/site-packages/matplotlib/artist.py",
line 54, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
  File
"/home/Patrick.Marsh/.local/lib/python2.7/site-packages/matplotlib/figure.py",
line 999, in draw
func(*args)
  File
"/home/Patrick.Marsh/.local/lib/python2.7/site-packages/matplotlib/artist.py",
line 54, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
  File
"/home/Patrick.Marsh/.local/lib/python2.7/site-packages/matplotlib/axes.py",
line 2086, in draw
a.draw(renderer)
  File
"/home/Patrick.Marsh/.local/lib/python2.7/site-packages/matplotlib/artist.py",
line 54, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
  File
"/home/Patrick.Marsh/.local/lib/python2.7/site-packages/matplotlib/collections.py",
line 699, in draw
return Collection.draw(self, renderer)
  File
"/home/Patrick.Marsh/.local/lib/python2.7/site-packages/matplotlib/artist.py",
line 54, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
  File
"/home/Patrick.Marsh/.local/lib/python2.7/site-packages/matplotlib/collections.py",
line 248, in draw
transform, transOffset, offsets, paths = self._prepare_points()
  File
"/home/Patrick.Marsh/.local/lib/python2.7/site-packages/matplotlib/collections.py",
line 222, in _prepare_points
offsets.shape = (-1, 2) # Make it Nx2
AttributeError: incompatible shape for a non-contiguous array

--
Ran 1123 tests in 401.586s

FAILED (KNOWNFAIL=282, SKIP=3, errors=51)



---
Patrick Marsh
Ph.D. Candidate / Liaison to the HWT
School of Meteorology / University of Oklahoma
Cooperative Institute for Mesoscale Meteorological Studies
National Severe Storms Laboratory
http://www.patricktmarsh.com
--
The Windows 8 Center - In partnership with Sourceforge
Your idea - your app - 30 days.
Get started!
http://windows8center.sourceforge.net/
what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel