SourceForge logo
SourceForge logo
Menu

matplotlib-devel — matplotlib developers

You can subscribe to this list here.

2003 Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
(1)
Nov
(33)
Dec
(20)
2004 Jan
(7)
Feb
(44)
Mar
(51)
Apr
(43)
May
(43)
Jun
(36)
Jul
(61)
Aug
(44)
Sep
(25)
Oct
(82)
Nov
(97)
Dec
(47)
2005 Jan
(77)
Feb
(143)
Mar
(42)
Apr
(31)
May
(93)
Jun
(93)
Jul
(35)
Aug
(78)
Sep
(56)
Oct
(44)
Nov
(72)
Dec
(75)
2006 Jan
(116)
Feb
(99)
Mar
(181)
Apr
(171)
May
(112)
Jun
(86)
Jul
(91)
Aug
(111)
Sep
(77)
Oct
(72)
Nov
(57)
Dec
(51)
2007 Jan
(64)
Feb
(116)
Mar
(70)
Apr
(74)
May
(53)
Jun
(40)
Jul
(519)
Aug
(151)
Sep
(132)
Oct
(74)
Nov
(282)
Dec
(190)
2008 Jan
(141)
Feb
(67)
Mar
(69)
Apr
(96)
May
(227)
Jun
(404)
Jul
(399)
Aug
(96)
Sep
(120)
Oct
(205)
Nov
(126)
Dec
(261)
2009 Jan
(136)
Feb
(136)
Mar
(119)
Apr
(124)
May
(155)
Jun
(98)
Jul
(136)
Aug
(292)
Sep
(174)
Oct
(126)
Nov
(126)
Dec
(79)
2010 Jan
(109)
Feb
(83)
Mar
(139)
Apr
(91)
May
(79)
Jun
(164)
Jul
(184)
Aug
(146)
Sep
(163)
Oct
(128)
Nov
(70)
Dec
(73)
2011 Jan
(235)
Feb
(165)
Mar
(147)
Apr
(86)
May
(74)
Jun
(118)
Jul
(65)
Aug
(75)
Sep
(162)
Oct
(94)
Nov
(48)
Dec
(44)
2012 Jan
(49)
Feb
(40)
Mar
(88)
Apr
(35)
May
(52)
Jun
(69)
Jul
(90)
Aug
(123)
Sep
(112)
Oct
(120)
Nov
(105)
Dec
(116)
2013 Jan
(76)
Feb
(26)
Mar
(78)
Apr
(43)
May
(61)
Jun
(53)
Jul
(147)
Aug
(85)
Sep
(83)
Oct
(122)
Nov
(18)
Dec
(27)
2014 Jan
(58)
Feb
(25)
Mar
(49)
Apr
(17)
May
(29)
Jun
(39)
Jul
(53)
Aug
(52)
Sep
(35)
Oct
(47)
Nov
(110)
Dec
(27)
2015 Jan
(50)
Feb
(93)
Mar
(96)
Apr
(30)
May
(55)
Jun
(83)
Jul
(44)
Aug
(8)
Sep
(5)
Oct
Nov
(1)
Dec
(1)
2016 Jan
Feb
Mar
(1)
Apr
May
Jun
(2)
Jul
Aug
(3)
Sep
(1)
Oct
(3)
Nov
Dec
2017 Jan
Feb
(5)
Mar
Apr
May
Jun
Jul
(3)
Aug
Sep
(7)
Oct
Nov
Dec
2018 Jan
Feb
Mar
Apr
May
Jun
Jul
(2)
Aug
Sep
Oct
Nov
Dec
S M T W T F S






1
2
3
4
5
6
(3)
7
8
(2)
9
(2)
10
(10)
11
(1)
12
(2)
13
(1)
14
15
16
17
18
(1)
19
(2)
20
(1)
21
(2)
22
23
(2)
24
(12)
25
(1)
26
(5)
27
(5)
28
(3)
29
30
(7)
31
(15)





Showing 10 results of 10

From: Andrew S. <str...@as...> - 2005年01月10日 21:39:26
John Hunter wrote:
>>>>>> "Perry" == Perry Greenfield <pe...@st...> writes:
>>>>>> 
>>>>>
>
> Perry> My 2 cents is that I think Fernando is right on this
> Perry> issue. I'd rather go with a solution that causes temporary
> Perry> pain for matlab users rather than one that causes
> Perry> lingering, long-term irritations.
>
> OK, looks like a consensus to me :-)
> 
>
I guess my opinion on this is already clear :).
> I'm happy with Fernando's proposed names amin, amax, around, etc. If
> everyone else is too, I propose Andrew implement his patch, provide
> the compatibility names, and update the relevant docs to advertise
> this prominently: API_CHANGES, CHANGELOG, tutorial and users guide.
> Particularly in the latter two, I think we should warn people about
> the potential performance hit of using the builtin min, max and
> friends on large arrays.
> 
>
I'm happy to implement whatever the consensus is, but I'm quite busy 
this week and away this weekend, so it'll be next week until I can do 
anything. If someone else wants to jump in and do it, I certainly won't 
mind.
Norbert Nemec wrote:
> There might be a solution that avoids the performance hit: there 
> should not be any problem with pylab offering an optimized set of min, 
> max, etc. as long as their signature is identical to the builtins and 
> the behavior only extends them. Something along the line of:
>
> def min(*args, **kwargs):
> if args == ():
> raise TypeError, "min() takes at least 1 argument (0 given)"
> if len(args) == 1 and type(args[0]) is ArrayType:
> axis=kwargs.pop('axis',0)
> res = minimum.reduce(args[0],axis)
> else:
> res = __builtin__.min(*args)
> if len(kwargs)>0:
> raise TypeError, (
> "min() got an unexpected keyword argument '%s'"
> %kwargs.keys()[0]
> )
> return res
What do people think about Norbert's "best of both worlds" approach? 
Although it seems great in theory, I'm disinclined to use it simply 
because it does override the builtin. Although he's doubtlessly 
constructed this with the greatest of care to perform exactly as the 
builtin, I wonder about obscure corner cases which won't behave exactly 
the same and may result in even more obscure bugs. Maybe my misgivings 
are undue paranoia on my part, and his 3rd way really is best. I 
suppose I'd want to throw lots of tests at it before I pronounce my 
final judgement on it, which I don't have time to do at the moment. 
(Next week, if need be...)
Just a thought for consideration: perhaps Norbert's code could actually 
be used by the underlying mlab.py modules? I guess some code in the 
wild uses the axis argument not as a keyword, so there would be a 
backwards incompatible change in that regard... Other than that, 
though, this kind of behavior from the mlab.py modules would probably 
have resulted in a less serious conundrum than what we now face.
Also, we must not forget about round, sum, and abs (and any others I 
have missed). For example, abs() caught me because I use the cgkit 
quaternion type, which overrides the __abs__ method and thus fails to 
work properly with the mlab.py implementation of abs().
Cheers!
Andrew
From: Andrew S. <as...@ca...> - 2005年01月10日 21:38:09
John Hunter wrote:
>>>>>>"Perry" == Perry Greenfield <pe...@st...> writes:
>>>>>> 
>>>>>>
>
> Perry> My 2 cents is that I think Fernando is right on this
> Perry> issue. I'd rather go with a solution that causes temporary
> Perry> pain for matlab users rather than one that causes
> Perry> lingering, long-term irritations.
>
>OK, looks like a consensus to me :-)
> 
>
I guess my opinion on this is already clear :).
>I'm happy with Fernando's proposed names amin, amax, around, etc. If
>everyone else is too, I propose Andrew implement his patch, provide
>the compatibility names, and update the relevant docs to advertise
>this prominently: API_CHANGES, CHANGELOG, tutorial and users guide.
>Particularly in the latter two, I think we should warn people about
>the potential performance hit of using the builtin min, max and
>friends on large arrays.
> 
>
I'm happy to implement whatever the consensus is, but I'm quite busy 
this week and away this weekend, so it'll be next week until I can do 
anything. If someone else wants to jump in and do it, I certainly won't 
mind.
Norbert Nemec wrote:
> There might be a solution that avoids the performance hit: there should not be 
> any problem with pylab offering an optimized set of min, max, etc. as long as 
> their signature is identical to the builtins and the behavior only extends 
> them. Something along the line of:
> 
> def min(*args, **kwargs):
> if args == ():
> raise TypeError, "min() takes at least 1 argument (0 given)"
> if len(args) == 1 and type(args[0]) is ArrayType:
> axis=kwargs.pop('axis',0)
> res = minimum.reduce(args[0],axis)
> else:
> res = __builtin__.min(*args)
> if len(kwargs)>0:
> raise TypeError, (
> "min() got an unexpected keyword argument '%s'"
> %kwargs.keys()[0]
> )
> return res
What do people think about Norbert's "best of both worlds" approach? Although it seems great in theory, I'm disinclined to use it simply because it does override the builtin. Although he's doubtlessly constructed this with the greatest of care to perform exactly as the builtin, I wonder about obscure corner cases which won't behave exactly the same and may result in even more obscure bugs. Maybe my misgivings are undue paranoia on my part, and his 3rd way really is best. I suppose I'd want to throw lots of tests at it before I pronounce my final judgement on it, which I don't have time to do at the moment. (Next week, if need be...)
Just a thought for consideration: perhaps Norbert's code could actually be used by the underlying mlab.py modules? I guess some code in the wild uses the axis argument not as a keyword, so there would be a backwards incompatible change in that regard... Other than that, though, this kind of behavior from the mlab.py modules would probably have resulted in a less serious conundrum than what we now face.
Also, we must not forget about round, sum, and abs (and any others I have missed). For example, abs() caught me because I use the cgkit quaternion type, which overrides the __abs__ method and thus fails to work properly with the mlab.py implementation of abs().
Cheers!
Andrew
From: Fernando P. <Fer...@co...> - 2005年01月10日 19:49:20
Norbert Nemec wrote:
> Am Montag, 10. Januar 2005 11:46 schrieb John Hunter:
> 
>>I'm happy with Fernando's proposed names amin, amax, around, etc. If
>>everyone else is too, I propose Andrew implement his patch, provide
>>the compatibility names, and update the relevant docs to advertise
>>this prominently: API_CHANGES, CHANGELOG, tutorial and users guide.
>>Particularly in the latter two, I think we should warn people about
>>the potential performance hit of using the builtin min, max and
>>friends on large arrays.
> 
> 
> There might be a solution that avoids the performance hit: there should not be 
> any problem with pylab offering an optimized set of min, max, etc. as long as 
> their signature is identical to the builtins and the behavior only extends 
> them. Something along the line of:
Hmm. Those extra checks in your code don't come for free... I'd rather leave 
the builtins alone (many of them are C-coded, hence quite fast), and just 
provide array versions where needed.
Just my 1e-2
Best,
f
From: Todd M. <jm...@st...> - 2005年01月10日 17:06:25
On Mon, 2005年01月10日 at 06:23, John Hunter wrote:
> >>>>> "John" == John Hunter <jdh...@ac...> writes:
> 
> John> I'm happy with Fernando's proposed names amin, amax, around,
> John> etc. If everyone else is too, I propose Andrew implement
> John> his patch, provide the compatibility names, and update the
> John> relevant docs to advertise this prominently: API_CHANGES,
> John> CHANGELOG, tutorial and users guide. Particularly in the
> John> latter two, I think we should warn people about the
> John> potential performance hit of using the builtin min, max and
> John> friends on large arrays.
> 
> Hmm, another thought.
> 
> If we are going to make this change for the pylab namespace, then it
> seems we might as well make the change in the numerix namespace as
> well, since all the same arguments apply. I think doing different
> things in numerix and pylab *is* a recipe for confusion. What do you
> think Todd, does this seem sensible?
> 
> Basically, the theme would be we use the underlying names from
> Numeric/numarray except when they clash with python builtins, in which
> case we'd use something like the a* names Fernando proposed.
> 
> Of course, changing the numerix names would mean the matplotlib code
> and examples will have to be updated as well. The former should be
> relatively easy since I believe there are no uses of unqualified min
> and max from numerix in the base code. Eg, we do in axes.py
> 
> from numerix import max as nxmax
> from numerix import min as nxmin
> 
> and in mlab.py we do MLab.max. But we'll have to be careful to make
> sure all the names Andrew identified are handled thoughout the coude
> and examples...
> 
> JDH
This all sounds fine to me. My understanding is that anywhere we "get
this wrong" the impact will be degraded performance. As an aside, I
avoid "from *" like the plague myself but understand that it's important
to optimize interactive use.
Unleash Andrew and I'll try to propagate the changes forward to Scipy.
Todd
From: Perry G. <pe...@st...> - 2005年01月10日 14:51:39
On Jan 10, 2005, at 6:23 AM, John Hunter wrote:
>>>>>> "John" == John Hunter <jdh...@ac...> writes:
>
> John> I'm happy with Fernando's proposed names amin, amax, around,
> John> etc. If everyone else is too, I propose Andrew implement
> John> his patch, provide the compatibility names, and update the
> John> relevant docs to advertise this prominently: API_CHANGES,
> John> CHANGELOG, tutorial and users guide. Particularly in the
> John> latter two, I think we should warn people about the
> John> potential performance hit of using the builtin min, max and
> John> friends on large arrays.
>
> Hmm, another thought.
>
> If we are going to make this change for the pylab namespace, then it
> seems we might as well make the change in the numerix namespace as
> well, since all the same arguments apply. I think doing different
> things in numerix and pylab *is* a recipe for confusion. What do you
> think Todd, does this seem sensible?
>
I can't argue with that (though Todd may have some comments of his 
own). In fact it would seem silly if numerix wasn't consistent.
From: Norbert N. <Nor...@gm...> - 2005年01月10日 13:30:27
Am Montag, 10. Januar 2005 11:46 schrieb John Hunter:
> I'm happy with Fernando's proposed names amin, amax, around, etc. If
> everyone else is too, I propose Andrew implement his patch, provide
> the compatibility names, and update the relevant docs to advertise
> this prominently: API_CHANGES, CHANGELOG, tutorial and users guide.
> Particularly in the latter two, I think we should warn people about
> the potential performance hit of using the builtin min, max and
> friends on large arrays.
There might be a solution that avoids the performance hit: there should not be 
any problem with pylab offering an optimized set of min, max, etc. as long as 
their signature is identical to the builtins and the behavior only extends 
them. Something along the line of:
def min(*args, **kwargs):
 if args == ():
 raise TypeError, "min() takes at least 1 argument (0 given)"
 if len(args) == 1 and type(args[0]) is ArrayType:
 axis=kwargs.pop('axis',0)
 res = minimum.reduce(args[0],axis)
 else:
 res = __builtin__.min(*args)
 if len(kwargs)>0:
 raise TypeError, (
 "min() got an unexpected keyword argument '%s'"
 %kwargs.keys()[0]
 )
 return res
Probably, one could even avoid separate amin, amax, etc. functions. The user 
just has to be aware that the axis can only be given as keyword argument.
-- 
_________________________________________Norbert Nemec
 Bernhardstr. 2 ... D-93053 Regensburg
 Tel: 0941 - 2009638 ... Mobil: 0179 - 7475199
 eMail: <No...@Ne...>
From: John H. <jdh...@ac...> - 2005年01月10日 11:28:50
>>>>> "John" == John Hunter <jdh...@ac...> writes:
 John> I'm happy with Fernando's proposed names amin, amax, around,
 John> etc. If everyone else is too, I propose Andrew implement
 John> his patch, provide the compatibility names, and update the
 John> relevant docs to advertise this prominently: API_CHANGES,
 John> CHANGELOG, tutorial and users guide. Particularly in the
 John> latter two, I think we should warn people about the
 John> potential performance hit of using the builtin min, max and
 John> friends on large arrays.
Hmm, another thought.
If we are going to make this change for the pylab namespace, then it
seems we might as well make the change in the numerix namespace as
well, since all the same arguments apply. I think doing different
things in numerix and pylab *is* a recipe for confusion. What do you
think Todd, does this seem sensible?
Basically, the theme would be we use the underlying names from
Numeric/numarray except when they clash with python builtins, in which
case we'd use something like the a* names Fernando proposed.
Of course, changing the numerix names would mean the matplotlib code
and examples will have to be updated as well. The former should be
relatively easy since I believe there are no uses of unqualified min
and max from numerix in the base code. Eg, we do in axes.py
from numerix import max as nxmax
from numerix import min as nxmin
and in mlab.py we do MLab.max. But we'll have to be careful to make
sure all the names Andrew identified are handled thoughout the coude
and examples...
JDH
From: John H. <jdh...@ac...> - 2005年01月10日 10:51:45
>>>>> "Perry" == Perry Greenfield <pe...@st...> writes:
 Perry> My 2 cents is that I think Fernando is right on this
 Perry> issue. I'd rather go with a solution that causes temporary
 Perry> pain for matlab users rather than one that causes
 Perry> lingering, long-term irritations.
OK, looks like a consensus to me :-)
I'm happy with Fernando's proposed names amin, amax, around, etc. If
everyone else is too, I propose Andrew implement his patch, provide
the compatibility names, and update the relevant docs to advertise
this prominently: API_CHANGES, CHANGELOG, tutorial and users guide.
Particularly in the latter two, I think we should warn people about
the potential performance hit of using the builtin min, max and
friends on large arrays.
I'll put this on the new "News Flash" section of the web site with the
next release, which at least should get people's attention.
A-foolish-consistency-is-the-hobgobblin-of-a-small-mindly-yours,
JDH
From: Perry G. <pe...@st...> - 2005年01月10日 03:17:02
Fernando Perez wrote:
> While pylab's mission is indeed is matlab compatibility, you 
> already point out 
> that this is not an 'at all costs' objective. This is one case 
> where I really 
> think that breaking compatibility with the base python language 
> is a too high 
> price to pay. I'm having a hard time justifying my position in a clear 
> manner, but I have a strong 'gut feeling' about it. I'll try to 
> provide some 
> rational points, though:
> 
[...]
My 2 cents is that I think Fernando is right on this issue. I'd rather
go with a solution that causes temporary pain for matlab users rather
than one that causes lingering, long-term irritations.
Perry
From: Fernando P. <Fer...@co...> - 2005年01月10日 01:39:35
John Hunter wrote:
> I'm weakly inclined to leave the situation as it is: it's compatible
> with matlab which is essentially the pylab mission, and it's worked
> for 10 or so years for Numeric's MLab. Cautious users and power users
> have a clear alternative. If we leave it as in, we can easily provide
> pymin, pymax, pyround, etc, for users who want the python version. I
> am open to the proposal, but I think we should frame the argument as
> one of performance versus convenience versus
> least-likely-to-bite-your-ass versus matlab-compatibility rather than
> fixing a bug.
While pylab's mission is indeed is matlab compatibility, you already point out 
that this is not an 'at all costs' objective. This is one case where I really 
think that breaking compatibility with the base python language is a too high 
price to pay. I'm having a hard time justifying my position in a clear 
manner, but I have a strong 'gut feeling' about it. I'll try to provide some 
rational points, though:
One of pylab's, objectives is to help matlab users move over to python. While 
initially they will naturally only use the compatible functions, we hope they 
will grow out into using all the things python offers which matlab lacks (nice 
OO, listcomps, generator expressions, the great generic standard library, 
etc.). This means that ultimately, we hope they will really use the python 
language to its fullest. At that point, if they begin using pyton code from 
'the wild', they are very likely to be bitten by this kind of incompatibility 
(as we all have).
The result: a decision made to ease the initial stages of a transition, ends 
up causing an everlasting headache. And it's not like we can guarantee 100% 
source compatibility, since they are after all different languages. I think 
it's much better to add min, max & friends to the few things matlab users need 
to learn in the transition, rather than have everyone pay for this from now on.
You also need to keep in mind that pylab is likely to be used by _python 
users_ who have no matlab experience (I am such a person). For this group, 
the change of a builtin in this manner is very unexpected, and the source of 
all sorts of problems. As anecdotal evidence, it was precisely this 
particular problem with MLab which convinced me, a few years ago, to _never_ 
use 'from foo import *'. Even though I was not a matlab user, I thought the 
MLab names were nice and short, and for a while imported it wholesale. Until 
I wasted a lot of time tracking the min/max bug one day. When I found it, I 
felt like screaming at the MLab writers, and decided never again to trust a 
third party library with a * import. To this day, I use Numeric and Scipy 
always with qualified imports.
IMHO, MLab simply got this one wrong 10 years ago, and pylab should not repeat 
their mistake. In my own code, I have often written simple a* routines: amap, 
amin, amax, around, short for arraymap, arraymin, etc. I think it's short and 
clear, and provides a nice distinction of their functionality versus the 
builtins (it's quicker to type amin than nxmin, esp. on a qwerty keyboard 
where nx is an off-home-row chord).
Anyway, this is as much as I'll say on the topic. It's ultimately your 
choice. But if I had my way, pylab would just provide a set of a*foo routines 
as array-based counterparts to the builtins, and it would document such a 
feature very prominently.
Cheers,
f

Showing 10 results of 10

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /