Re: [Matplotlib-users] compile error with python2.5

2006-09-20 Thread David M. Cooke
Achim Gaedke
[EMAIL PROTECTED]
writes:

 While compiling matplotlib-0.87.5 with python-2.5 on debian testing some
 errors occured:

[snip errors]


 similar errors occured in src/swig_runtime.h

 src/swig_runtime.h: In function 'int SWIG_Python_ConvertPtr(PyObject*,
 void**, swig_type_info*, int)':
 src/swig_runtime.h:1140: error: invalid conversion from 'const char*' to
 'char*'

There are also problems with the CXX/ code using int instead of
Py_ssize_t. I've submitted a patch with fixes for that, and your patch
for the above problem:

http://sourceforge.net/tracker/index.php?func=detailaid=1561959group_id=80706atid=560722

-- 
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] compile error with python2.5

2006-09-20 Thread Achim Gaedke
Hello Charlie!

Hmmm... Basically you are right. But maybe you are more familiar with
SWIG issues than I am.

Ok, I will do the job and go to swig and have a look:

http://swig.cvs.sourceforge.net/swig/SWIG/Lib/python/pyrun.swg?r1=1.143r2=1.144

You will find this error corrected five months ago.

You are using version: 1.3.27 (as stated in the file's header), the last
official release is 1.3.12 (June 2006) and the latest cvs version 1.3.30
(in progress). I do not understand why this version is not in use...

Maybe you should try the latest SWIG version.

Yours, Achim

Charlie Moad wrote:
 Thanks for the patch.  Ideally we need to find a way to fix this in
 swig though.  Otherwise we would have to reapply the patch every time
 we regenerate the wrappings.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] compile error with python2.5

2006-09-20 Thread Charlie Moad
This came up on the dev list yesterday and we tried with swig-1.3.29,
which is the latest listed release on SF.  The link you provided shows
this was indeed fixed after the 1.3.29 release.  Jon, can we give
bleeding edge swig a try?

Thanks,
 Charlie

On 9/20/06, Achim Gaedke [EMAIL PROTECTED] wrote:
 Hello Charlie!

 Hmmm... Basically you are right. But maybe you are more familiar with
 SWIG issues than I am.

 Ok, I will do the job and go to swig and have a look:

 http://swig.cvs.sourceforge.net/swig/SWIG/Lib/python/pyrun.swg?r1=1.143r2=1.144

 You will find this error corrected five months ago.

 You are using version: 1.3.27 (as stated in the file's header), the last
 official release is 1.3.12 (June 2006) and the latest cvs version 1.3.30
 (in progress). I do not understand why this version is not in use...

 Maybe you should try the latest SWIG version.

 Yours, Achim

 Charlie Moad wrote:
  Thanks for the patch.  Ideally we need to find a way to fix this in
  swig though.  Otherwise we would have to reapply the patch every time
  we regenerate the wrappings.



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] masked arrays on objects arrays doesn't plot

2006-09-20 Thread Lionel Roubeyrie
Hi all,
I use a array with dtype=object for mixing datetime and float values, like:
##
lionel[ETD-2006-01__PM2.5_DALTON]68datas[0:5,]
Sortie[68]:
array(data =
 [[2006-01-05 00:00:00 33.0 1e-20]
 [2006-01-06 00:00:00 41.0 30.0]
 [2006-01-07 00:00:00 20.0 16.0]
 [2006-01-08 00:00:00 16.0 13.0]
 [2006-01-09 00:00:00 18.0 15.0]],
  mask =
 [[False False True]
 [False False False]
 [False False False]
 [False False False]
 [False False False]],
  fill_value=1e-20)
##

but I get a error when I want to plot directly using
plot_date(date2num(datas[:,0]),datas[:,1]):

##
---
exceptions.TypeError Traceback (most recent 
call last)

/home/lionel/Etudes_Techniques/ETD-2006-01__PM2.5_DALTON/ipython console

/usr/lib/python2.4/site-packages/matplotlib/pylab.py in plot_date(*args, 
**kwargs)
   2038 hold(h)
   2039 try:
- 2040 ret =  gca().plot_date(*args, **kwargs)
   2041 draw_if_interactive()
   2042 except:

/usr/lib/python2.4/site-packages/matplotlib/axes.py in plot_date(self, x, y, 
fmt, tz, xdate, ydate, **kwargs)
   2159 if not self._hold: self.cla()
   2160
- 2161 ret = self.plot(x, y, fmt, **kwargs)
   2162
   2163 if xdate:

/usr/lib/python2.4/site-packages/matplotlib/axes.py in plot(self, *args, 
**kwargs)
   2121 if not self._hold: self.cla()
   2122 lines = []
- 2123 for line in self._get_lines(*args, **d):
   2124 self.add_line(line)
   2125 lines.append(line)

/usr/lib/python2.4/site-packages/matplotlib/axes.py in _grab_next_args(self, 
*args, **kwargs)
308 if not is_string_like(remaining[2]):
309 raise ValueError, 'third arg must be a format 
string'
-- 310 yield self._plot_3_args(remaining, **kwargs)
311 remaining=[]
312 continue

/usr/lib/python2.4/site-packages/matplotlib/axes.py in _plot_3_args(self, 
tup3, **kwargs)
279  linestyle=linestyle, marker=marker,
280  markerfacecolor=color,
-- 281  markeredgecolor=mec,
282  )
283 self.set_lineprops(ret, **kwargs)

/usr/lib/python2.4/site-packages/matplotlib/lines.py in __init__(self, xdata, 
ydata, linewidth, linestyle, color, marker, markersize, markeredgewidth, 
markeredgecolor, markerfacecolor, antialiased, dash_capstyle, solid_capstyle, 
dash_joinstyle, solid_joinstyle, **kwargs)
204 self.verticalOffset = None
205
-- 206 self.set_data(xdata, ydata)
207
208 if not self._lineStyles.has_key(linestyle):

/usr/lib/python2.4/site-packages/matplotlib/lines.py in set_data(self, *args)
280
281 self._x = asarray(x, Float)
-- 282 self._y = asarray(y, Float)
283
284 self._logcache = None

/usr/lib/python2.4/site-packages/numpy/oldnumeric/functions.py in asarray(a, 
typecode, dtype)
 82 def asarray(a, typecode=None, dtype=None):
 83 dtype = convtypecode2(typecode, dtype)
--- 84 return mu.array(a, dtype, copy=0)
 85
 86 def nonzero(a):

TypeError: array cannot be safely cast to required type
##

but the line:
plot_date(date2num(datas[:,0]), ma.masked_values(datas[:,1].tolist() ,1.e-20)) 
works perfectly. Do I do something wrong?
thanks

-- 
Lionel Roubeyrie - [EMAIL PROTECTED]
LIMAIR
http://www.limair.asso.fr

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] compile error with python2.5

2006-09-20 Thread John Hunter
 Charlie == Charlie Moad [EMAIL PROTECTED] writes:

Charlie This came up on the dev list yesterday and we tried with
Charlie swig-1.3.29, which is the latest listed release on SF.
Charlie The link you provided shows this was indeed fixed after
Charlie the 1.3.29 release.  Jon, can we give bleeding edge swig
Charlie a try?

OK, bleeding edge SWIG versions of the agg wrappers are in svn.

Good luck!

JDH

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] compile error with python2.5

2006-09-20 Thread Charlie Moad
It builds now.  We still have to wait on a useable numpy for python2.5
and pygtk for windows/py2.5.  All the other components are there or we
can build.

On 9/20/06, John Hunter [EMAIL PROTECTED] wrote:
  Charlie == Charlie Moad [EMAIL PROTECTED] writes:

 Charlie This came up on the dev list yesterday and we tried with
 Charlie swig-1.3.29, which is the latest listed release on SF.
 Charlie The link you provided shows this was indeed fixed after
 Charlie the 1.3.29 release.  Jon, can we give bleeding edge swig
 Charlie a try?

 OK, bleeding edge SWIG versions of the agg wrappers are in svn.

 Good luck!

 JDH


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] compile error with python2.5

2006-09-20 Thread Achim Gaedke
Hi there!

I built numpy-1.0b5 and pygtk with python2.5 on Sunday. It worked, but I
use numarray as standard numerix extension.
There was a bugfix for numpy-1.0b5 that is already contained in their
repository version.

Yours, Achim

Charlie Moad wrote:
 It builds now.  We still have to wait on a useable numpy for python2.5
 and pygtk for windows/py2.5.  All the other components are there or we
 can build.

diff -ru numpy-1.0b5/numpy/core/src/arrayobject.c 
numpy-1.0b5_fixed/numpy/core/src/arrayobject.c
--- numpy-1.0b5/numpy/core/src/arrayobject.c2006-09-05 00:41:47.0 
+0200
+++ numpy-1.0b5_fixed/numpy/core/src/arrayobject.c  2006-09-17 
21:41:49.0 +0200
@@ -561,8 +561,8 @@
 return ret;
 }
 #if (PY_VERSION_HEX = 0x0205)
-   if (PyIndex_Check(op)) {
-   long_value = (longlong) PyNumber_Index(op);
+   if (PyIndex_Check(o)) {
+   long_value = (longlong) PyNumber_Index(o);
goto finish;
}
 #endif
@@ -2691,7 +2691,7 @@
 }
 
 if (PyInt_Check(op) || PyArray_IsScalar(op, Integer) ||
-PyLong_Check(op) || PyIndex_Check(index)) {
+PyLong_Check(op) || PyIndex_Check(op)) {
 intp value;
 value = PyArray_PyIntAsIntp(op);
 if (!PyErr_Occurred()) {
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] compile error with python2.5

2006-09-20 Thread Andrew Jaffe
Hi all,

As discussed by David Cooke, above, I think there are still some other 
issues, at least under OSX: several files need to be patch to convert 
int to the new Py_ssize_t, at least in cxx_extensions.cxx and _image.cpp

Will these be changed?

Andrew



Achim Gaedke wrote:
 Hi there!
 
 I built numpy-1.0b5 and pygtk with python2.5 on Sunday. It worked, but I
 use numarray as standard numerix extension.
 There was a bugfix for numpy-1.0b5 that is already contained in their
 repository version.
 
 Yours, Achim
 
 Charlie Moad wrote:
 It builds now.  We still have to wait on a useable numpy for python2.5
 and pygtk for windows/py2.5.  All the other components are there or we
 can build.
 


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] saving displayed fig as ps fails

2006-09-20 Thread George Nurser
SVN revision 2774, linux 64-bit, TkAgg, NumPy.

If I create a figure on the screen (TkAgg back end), when I try to
save it as .ps, the resulting file displays and prints as blank.
However I can save it as .eps (or png) perfectly well.


-George Nurser.

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] compile error with python2.5

2006-09-20 Thread Charlie Moad
I applied the parts of the patch that don't affect the swig files.
Seems to be working well.

Thanks,
Charlie

On 9/20/06, Andrew Jaffe [EMAIL PROTECTED] wrote:
 Hi all,

 As discussed by David Cooke, above, I think there are still some other
 issues, at least under OSX: several files need to be patch to convert
 int to the new Py_ssize_t, at least in cxx_extensions.cxx and _image.cpp

 Will these be changed?

 Andrew



 Achim Gaedke wrote:
  Hi there!
 
  I built numpy-1.0b5 and pygtk with python2.5 on Sunday. It worked, but I
  use numarray as standard numerix extension.
  There was a bugfix for numpy-1.0b5 that is already contained in their
  repository version.
 
  Yours, Achim
 
  Charlie Moad wrote:
  It builds now.  We still have to wait on a useable numpy for python2.5
  and pygtk for windows/py2.5.  All the other components are there or we
  can build.
 


 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your
 opinions on IT  business topics through brief surveys -- and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users