|
From: Gael V. <gae...@no...> - 2010-02-21 16:27:25
|
On Sun, Feb 21, 2010 at 03:52:41PM +0000, Andrea Gavana wrote:
> On 21 February 2010 15:44, Alan G Isaac wrote:
> > On 2/21/2010 10:29 AM, Wayne Watson wrote:
> >> plot(2.8,3.4) doesn't work in my program
> > Why should it?
> I believe it should.
> > Plot takes once or two *sequences* of numbers as arguments.
> I don't think it would be so complicated for the "plot" code to check
> for the type of the input arguments and then create a list (or a
> sequence) on the fly, i.e. (pseudo-code, untested):
> if isinstance(x, types.IntType):
> x = [x]
Or rather:
np.atleast_1d
Gaël
|