{"commit":"c5887b75ff3e196f6b323366a11269eada506c95","subject":"Add missing version of plplot.py in for numpy.","message":"Add missing version of plplot.py in for numpy.\n\n\nsvn path=\/trunk\/; revision=7761\n","repos":"FreeScienceCommunity\/PLPlot,FreeScienceCommunity\/PLPlot,FreeScienceCommunity\/PLPlot,FreeScienceCommunity\/PLPlot,FreeScienceCommunity\/PLPlot,FreeScienceCommunity\/PLPlot,FreeScienceCommunity\/PLPlot,FreeScienceCommunity\/PLPlot,FreeScienceCommunity\/PLPlot","old_file":"bindings\/python\/plplot.py.numpy","new_file":"bindings\/python\/plplot.py.numpy","new_contents":"# Copyright 2002 Gary Bishop and Alan W. Irwin\n# This file is part of PLplot.\n\n# PLplot is free software; you can redistribute it and\/or modify\n# it under the terms of the GNU Library General Public License as published by\n# the Free Software Foundation; version 2 of the License.\n\n# PLplot is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Library General Public License for more details.\n\n# You should have received a copy of the GNU Library General Public License\n# along with the file PLplot; if not, write to the Free Software\n# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n\n# Wrap raw python interface to C API, plplotc, with this user-friendly version\n# which implements some useful variations of the argument lists.\n\nfrom plplotc import *\nimport types\nimport numpy\n\n# Redefine plcont to have the user-friendly interface\n# Allowable syntaxes:\n\n# plcont( z, [kx, lx, ky, ly], clev, [pltr, [pltr_data] or [xg, yg, [wrap]]])\n# N.B. Brackets represent options here and not python lists!\n\n# All unbracketed arguments within brackets must all be present or all be\n# missing. Furthermore, z must be a 2D array, kx, lx, ky, ly must all be\n# integers, clev must be a 1D array, pltr can be a function reference or\n# string, pltr_data is an optional arbitrary data object, xg and yg are \n# optional 1D or 2D arrays and wrap (which only works if xg and yg\n# are specified) is 0, 1, or 2.\n\n# If pltr is a string it must be either \"pltr0\", \"pltr1\", or \"pltr2\" to\n# refer to those built-in transformation functions. Alternatively, the\n# function names pltr0, pltr1, or pltr2 may be specified to refer to\n# the built-in transformation functions or an arbitrary name for a\n# user-defined transformation function may be specified. Such functions\n# must have x, y, and optional pltr_data arguments and return arbitrarily\n# transformed x' and y' in a tuple. The built-in pltr's such as pltr1 and\n# pltr2 use pltr_data = tuple(xg, yg), and for this oft-used case (and any\n# other user-defined pltr which uses a tuple of two arrays for pltr_data),\n# we also provide optional xg and yg arguments separately as an alternative\n# to the tuple method of providing these data. Note, that pltr_data cannot\n# be in the argument list if xg and yg are there, and vice versa. Also note\n# that the built-in pltr0 and some user-defined transformation functions\n# ignore the auxiliary pltr_data (or the alternative xg and yg) in which\n# case neither pltr_data nor xg and yg need to be specified.\n\n_plcont = plcont\ndef plcont(z, *args):\n z = numpy.asarray(z)\n if len(z.shape) != 2:\n\traise ValueError, \"Expected 2D z array\"\n\n if len(args) > 4 and type(args[0]) == types.IntType:\n\tfor i in range(1,4):\n\t if type(args[i]) != types.IntType:\n\t\traise ValueError, \"Expected 4 ints for kx,lx,ky,ly\"\n\n\telse:\n\t # these 4 args are the kx, lx, ky, ly ints\n\t ifdefault_range = 0\n\t kx,lx,ky,ly = args[0:4]\n\t args = args[4:]\n else:\n\tifdefault_range = 1\n\n if len(args) > 0:\n\tclev = numpy.asarray(args[0])\n\tif len(clev.shape) !=1:\n\t raise ValueError, \"Expected 1D clev array\"\n\targs = args[1:]\n else:\n\traise ValueError, \"Missing clev argument\"\n\n if len(args) > 0 and ( \\\n type(args[0]) == types.StringType or \\\n type(args[0]) == types.FunctionType or \\\n type(args[0]) == types.BuiltinFunctionType):\n\tpltr = args[0]\n\t# Handle the string names for the callbacks though specifying the\n\t# built-in function name directly (without the surrounding quotes) \n\t# or specifying any user-defined transformation function \n\t# (following above rules) works fine too.\n\tif type(pltr) == types.StringType:\n\t if pltr == \"pltr0\":\n\t\tpltr = pltr0\n\t elif pltr == \"pltr1\":\n\t\tpltr = pltr1\n\t elif pltr == \"pltr2\":\n\t\tpltr = pltr2\n\t else:\n\t\traise ValueError, \"pltr string is unrecognized\"\n\n\targs = args[1:]\n\t# Handle pltr_data or separate xg, yg, [wrap]\n\tif len(args) == 0:\n\t # Default pltr_data\n\t pltr_data = None\n\telif len(args) == 1:\n\t #Must be pltr_data\n\t pltr_data = args[0]\n\t args = args[1:]\n\telif len(args) >= 2:\n\t xg = numpy.asarray(args[0])\n\t if len(xg.shape) < 1 or len(xg.shape) > 2:\n\t\traise ValueError, \"xg must be 1D or 2D array\"\n\t yg = numpy.asarray(args[1])\n\t if len(yg.shape) != len(xg.shape):\n\t\traise ValueError, \"yg must have same number of dimensions as xg\"\n\t args = args[2:]\n\t # wrap only relevant if xg and yg specified.\n\t if len(args) > 0:\n\t if type(args[0]) == types.IntType:\n\t wrap = args[0]\n\t args = args[1:]\n\t if len(xg.shape) == 2 and len(yg.shape) == 2 and \\\n\t z.shape == xg.shape and z.shape == yg.shape:\n\t\t# handle wrap\n\t\tif wrap == 1:\n\t\t z = numpy.resize(z, (z.shape[0]+1, z.shape[1]))\n\t\t xg = numpy.resize(xg, (xg.shape[0]+1, xg.shape[1]))\n\t\t yg = numpy.resize(yg, (yg.shape[0]+1, yg.shape[1]))\n\t\telif wrap == 2:\n\t\t z = numpy.transpose(numpy.resize( \\\n\t\t numpy.transpose(z), (z.shape[1]+1, z.shape[0])))\n\t\t xg = numpy.transpose(numpy.resize( \\\n\t\t numpy.transpose(xg), (xg.shape[1]+1, xg.shape[0])))\n\t\t yg = numpy.transpose(numpy.resize( \\\n\t\t numpy.transpose(yg), (yg.shape[1]+1, yg.shape[0])))\n\t\telif wrap != 0:\n\t\t raise ValueError, \"Invalid wrap specifier, must be 0, 1 or 2.\"\n\t elif wrap != 0:\n\t\t raise ValueError, \"Non-zero wrap specified and xg and yg are not 2D arrays\"\n\t else:\n\t\t raise ValueError, \"Specified wrap is not an integer\"\n\t pltr_data = (xg, yg)\n else:\n\t# default is identity transformation\n\tpltr = pltr0\n\tpltr_data = None\n if len(args) > 0:\n\traise ValueError, \"Too many arguments for plcont\"\n if ifdefault_range:\n\t# Default is to take full range (still using fortran convention\n\t# for indices which is embedded in the PLplot library API)\n\tkx = 1\n\tlx = z.shape[0]\n\tky = 1\n\tly = z.shape[1]\n _plcont(z, kx, lx, ky, ly, clev, pltr, pltr_data)\nplcont.__doc__ = _plcont.__doc__\n \n# Redefine plvect to have the user-friendly interface\n# Allowable syntaxes:\n\n# plvect( u, v, scaling, [pltr, [pltr_data] or [xg, yg, [wrap]]])\n_plvect = plvect\ndef plvect(u, v, *args):\n u = numpy.asarray(u)\n v = numpy.asarray(v)\n\n if len(u.shape) != 2:\n raise ValueError, \"Expected 2D u array\"\n if len(v.shape) != 2:\n raise ValueError, \"Expected 2D v array\"\n if (u.shape[0] != v.shape[0]) or (u.shape[1] != v.shape[1]) :\n raise ValueError, \"Expected u and v arrays to be the same dimensions\"\n\n if len(args) > 0 and (type(args[0]) == types.FloatType or type(args[0]) == numpy.float64) :\n scaling = args[0]\n args = args[1:]\n else:\n raise ValueError, \"Missing scaling argument\"\n\n if len(args) > 0 and ( \\\n type(args[0]) == types.StringType or \\\n type(args[0]) == types.FunctionType or \\\n type(args[0]) == types.BuiltinFunctionType):\n pltr = args[0]\n # Handle the string names for the callbacks though specifying the\n # built-in function name directly (without the surrounding quotes) \n # or specifying any user-defined transformation function \n # (following above rules) works fine too.\n if type(pltr) == types.StringType:\n if pltr == \"pltr0\":\n pltr = pltr0\n elif pltr == \"pltr1\":\n pltr = pltr1\n elif pltr == \"pltr2\":\n pltr = pltr2\n else:\n raise ValueError, \"pltr string is unrecognized\"\n\n args = args[1:]\n # Handle pltr_data or separate xg, yg, [wrap]\n if len(args) == 0:\n # Default pltr_data\n pltr_data = None\n elif len(args) == 1:\n #Must be pltr_data\n pltr_data = args[0]\n args = args[1:]\n elif len(args) >= 2:\n xg = numpy.asarray(args[0])\n if len(xg.shape) < 1 or len(xg.shape) > 2:\n raise ValueError, \"xg must be 1D or 2D array\"\n yg = numpy.asarray(args[1])\n if len(yg.shape) != len(xg.shape):\n raise ValueError, \"yg must have same number of dimensions as xg\"\n args = args[2:]\n # wrap only relevant if xg and yg specified.\n if len(args) > 0:\n if type(args[0]) == types.IntType:\n wrap = args[0]\n args = args[1:]\n if len(xg.shape) == 2 and len(yg.shape) == 2 and \\\n u.shape == xg.shape and u.shape == yg.shape:\n # handle wrap\n if wrap == 1:\n u = numpy.resize(u, (u.shape[0]+1, u.shape[1]))\n v = numpy.resize(v, (v.shape[0]+1, v.shape[1]))\n xg = numpy.resize(xg, (xg.shape[0]+1, xg.shape[1]))\n yg = numpy.resize(yg, (yg.shape[0]+1, yg.shape[1]))\n elif wrap == 2:\n u = numpy.transpose(numpy.resize( \\\n numpy.transpose(u), (u.shape[1]+1, u.shape[0])))\n v = numpy.transpose(numpy.resize( \\\n numpy.transpose(v), (v.shape[1]+1, v.shape[0])))\n xg = numpy.transpose(numpy.resize( \\\n numpy.transpose(xg), (xg.shape[1]+1, xg.shape[0])))\n yg = numpy.transpose(numpy.resize( \\\n numpy.transpose(yg), (yg.shape[1]+1, yg.shape[0])))\n elif wrap != 0:\n raise ValueError, \"Invalid wrap specifier, must be 0, 1 or 2.\"\n elif wrap != 0:\n raise ValueError, \"Non-zero wrap specified and xg and yg are not 2D arrays\"\n else:\n raise ValueError, \"Specified wrap is not an integer\"\n pltr_data = (xg, yg)\n else:\n # default is identity transformation\n pltr = pltr0\n pltr_data = None\n if len(args) > 0:\n raise ValueError, \"Too many arguments for plvect\"\n _plvect(u, v, scaling, pltr, pltr_data)\nplvect.__doc__ = _plvect.__doc__\n\n# Redefine plshades to have the user-friendly interface\n# Allowable syntaxes:\n\n# plshades(z, [xmin, xmax, ymin, ymax,] clev, \\\n# fill_width, [cont_color, cont_width,], rect, \\\n# [pltr, [pltr_data] or [xg, yg, [wrap]]])\n \n_plshades = plshades\ndef plshades(z, *args):\n z = numpy.asarray(z)\n if len(z.shape) != 2:\n\traise ValueError, \"Expected 2D z array\"\n\n if len(args) > 4 and \\\n (type(args[0]) == types.FloatType or type(args[0]) == types.IntType) and \\\n (type(args[1]) == types.FloatType or type(args[1]) == types.IntType) and \\\n (type(args[2]) == types.FloatType or type(args[2]) == types.IntType) and \\\n (type(args[3]) == types.FloatType or type(args[3]) == types.IntType):\n\t# These 4 args are xmin, xmax, ymin, ymax\n\txmin, xmax, ymin, ymax = args[0:4]\n\targs = args[4:]\n else:\n\t# These values are ignored if pltr and pltr_data are defined in any case.\n\t# So pick some convenient defaults that work for the pltr0, None case\n\txmin = -1.\n\txmax = 1.\n\tymin = -1.\n\tymax = 1.\n\n # clev must be present.\n if len(args) > 0:\n\tclev = numpy.asarray(args[0])\n\tif len(clev.shape) !=1:\n\t raise ValueError, \"Expected 1D clev array\"\n\targs = args[1:]\n else:\n\traise ValueError, \"Missing clev argument\"\n\n # fill_width must be present\n if len(args) > 0 and type(args[0]) == types.IntType:\n\tfill_width = args[0]\n\targs = args[1:]\n else:\n\traise ValueError, \"Missing fill_width argument\"\n\n # cont_color and cont_width are optional.\n if len(args) > 2 and \\\n type(args[0]) == types.IntType and \\\n type(args[1]) == types.IntType:\n\t# These 2 args are \n\tcont_color, cont_width = args[0:2]\n\targs = args[2:]\n else:\n\t# Turn off contouring.\n\tcont_color, cont_width = (0,0)\n\n # rect must be present.\n if len(args) > 0 and type(args[0]) == types.IntType:\n\trect = args[0]\n\targs = args[1:]\n else:\n\traise ValueError, \"Missing rect argument\"\n\n if len(args) > 0 and ( \\\n type(args[0]) == types.StringType or \\\n type(args[0]) == types.FunctionType or \\\n type(args[0]) == types.BuiltinFunctionType):\n\tpltr = args[0]\n\t# Handle the string names for the callbacks though specifying the\n\t# built-in function name directly (without the surrounding quotes) \n\t# or specifying any user-defined transformation function \n\t# (following above rules) works fine too.\n\tif type(pltr) == types.StringType:\n\t if pltr == \"pltr0\":\n\t\tpltr = pltr0\n\t elif pltr == \"pltr1\":\n\t\tpltr = pltr1\n\t elif pltr == \"pltr2\":\n\t\tpltr = pltr2\n\t else:\n\t\traise ValueError, \"pltr string is unrecognized\"\n\n\targs = args[1:]\n\t# Handle pltr_data or separate xg, yg, [wrap]\n\tif len(args) == 0:\n\t # Default pltr_data\n\t pltr_data = None\n\telif len(args) == 1:\n\t #Must be pltr_data\n\t pltr_data = args[0]\n\t args = args[1:]\n\telif len(args) >= 2:\n\t xg = numpy.asarray(args[0])\n\t if len(xg.shape) < 1 or len(xg.shape) > 2:\n\t\traise ValueError, \"xg must be 1D or 2D array\"\n\t yg = numpy.asarray(args[1])\n\t if len(yg.shape) != len(xg.shape):\n\t\traise ValueError, \"yg must have same number of dimensions as xg\"\n\t args = args[2:]\n\t # wrap only relevant if xg and yg specified.\n\t if len(args) > 0:\n\t if type(args[0]) == types.IntType:\n\t wrap = args[0]\n\t args = args[1:]\n\t if len(xg.shape) == 2 and len(yg.shape) == 2 and \\\n\t z.shape == xg.shape and z.shape == yg.shape:\n\t\t# handle wrap\n\t\tif wrap == 1:\n\t\t z = numpy.resize(z, (z.shape[0]+1, z.shape[1]))\n\t\t xg = numpy.resize(xg, (xg.shape[0]+1, xg.shape[1]))\n\t\t yg = numpy.resize(yg, (yg.shape[0]+1, yg.shape[1]))\n\t\telif wrap == 2:\n\t\t z = numpy.transpose(numpy.resize( \\\n\t\t numpy.transpose(z), (z.shape[1]+1, z.shape[0])))\n\t\t xg = numpy.transpose(numpy.resize( \\\n\t\t numpy.transpose(xg), (xg.shape[1]+1, xg.shape[0])))\n\t\t yg = numpy.transpose(numpy.resize( \\\n\t\t numpy.transpose(yg), (yg.shape[1]+1, yg.shape[0])))\n\t\telif wrap != 0:\n\t\t raise ValueError, \"Invalid wrap specifier, must be 0, 1 or 2.\"\n\t elif wrap != 0:\n\t\t raise ValueError, \"Non-zero wrap specified and xg and yg are not 2D arrays\"\n\t else:\n\t\t raise ValueError, \"Specified wrap is not an integer\"\n\t pltr_data = (xg, yg)\n else:\n\t# default is identity transformation\n\tpltr = pltr0\n\tpltr_data = None\n if len(args) > 0:\n\traise ValueError, \"Too many arguments for plshades\"\n\n _plshades(z, xmin, xmax, ymin, ymax, clev, \\\n fill_width, cont_color, cont_width, rect, pltr, pltr_data)\nplshades.__doc__ = _plshades.__doc__\n \n# Redefine plshade to have the user-friendly interface\n# Allowable syntaxes:\n\n# _plshade(z, [xmin, xmax, ymin, ymax,] \\\n# shade_min, shade_max, sh_cmap, sh_color, sh_width, \\\n# [min_color, min_width, max_color, max_width,] rect, \\\n# [pltr, [pltr_data] or [xg, yg, [wrap]]])\n\n# plshade(z, [xmin, xmax, ymin, ymax,] clev, \\\n# fill_width, [cont_color, cont_width,], rect, \\\n# [pltr, [pltr_data] or [xg, yg, [wrap]]])\n \n_plshade = plshade\ndef plshade(z, *args):\n z = numpy.asarray(z)\n if len(z.shape) != 2:\n\traise ValueError, \"Expected 2D z array\"\n\n # Extra check on shade_min = float on end is absolutely necessary\n # to unambiguously figure out where we are in the argument list.\n if len(args) > 9 and \\\n (type(args[0]) == types.FloatType or type(args[0]) == numpy.float64 or type(args[0]) == types.IntType) and \\\n (type(args[1]) == types.FloatType or type(args[1]) == numpy.float64 or type(args[1]) == types.IntType) and \\\n (type(args[2]) == types.FloatType or type(args[2]) == numpy.float64 or type(args[2]) == types.IntType) and \\\n (type(args[3]) == types.FloatType or type(args[3]) == numpy.float64 or type(args[3]) == types.IntType) and \\\n (type(args[4]) == types.FloatType or type(args[4]) == numpy.float64) :\n\t# These 4 args are xmin, xmax, ymin, ymax\n\txmin, xmax, ymin, ymax = args[0:4]\n\targs = args[4:]\n else:\n\t# These values are ignored if pltr and pltr_data are defined in any case.\n\t# So pick some convenient defaults that work for the pltr0, None case\n\txmin = -1.\n\txmax = 1.\n\tymin = -1.\n\tymax = 1.\n\n # shade_min, shade_max, sh_cmap, sh_color, sh_width, must be present.\n # sh_color can be either integer or float.\n if len(args) > 5 and \\\n (type(args[0]) == types.FloatType or type(args[0]) == numpy.float64) and \\\n (type(args[1]) == types.FloatType or type(args[1]) == numpy.float64) and \\\n type(args[2]) == types.IntType and \\\n (type(args[3]) == types.FloatType or type(args[3]) == numpy.float64 or type(args[3]) == types.IntType) and \\\n type(args[4]) == types.IntType:\n\tshade_min, shade_max, sh_cmap, sh_color, sh_width = args[0:5]\n\targs = args[5:]\n else:\n\traise ValueError, \\\n\t\"shade_min, shade_max, sh_cmap, sh_color, sh_width, must be present\"\n\n # min_color, min_width, max_color, max_width are optional.\n if len(args) > 4 and \\\n type(args[0]) == types.IntType and \\\n type(args[1]) == types.IntType and \\\n type(args[2]) == types.IntType and \\\n type(args[3]) == types.IntType:\n\t# These 4 args are \n\tmin_color, min_width, max_color, max_width = args[0:4]\n\targs = args[4:]\n else:\n\t# Turn off boundary colouring\n\tmin_color, min_width, max_color, max_width = (0,0,0,0)\n\n # rect must be present.\n if len(args) > 0 and type(args[0]) == types.IntType:\n\trect = args[0]\n\targs = args[1:]\n else:\n\traise ValueError, \"Missing rect argument\"\n\n if len(args) > 0 and ( \\\n type(args[0]) == types.StringType or \\\n type(args[0]) == types.FunctionType or \\\n type(args[0]) == types.BuiltinFunctionType):\n\tpltr = args[0]\n\t# Handle the string names for the callbacks though specifying the\n\t# built-in function name directly (without the surrounding quotes) \n\t# or specifying any user-defined transformation function \n\t# (following above rules) works fine too.\n\tif type(pltr) == types.StringType:\n\t if pltr == \"pltr0\":\n\t\tpltr = pltr0\n\t elif pltr == \"pltr1\":\n\t\tpltr = pltr1\n\t elif pltr == \"pltr2\":\n\t\tpltr = pltr2\n\t else:\n\t\traise ValueError, \"pltr string is unrecognized\"\n\n\targs = args[1:]\n\t# Handle pltr_data or separate xg, yg, [wrap]\n\tif len(args) == 0:\n\t # Default pltr_data\n\t pltr_data = None\n\telif len(args) == 1:\n\t #Must be pltr_data\n\t pltr_data = args[0]\n\t args = args[1:]\n\telif len(args) >= 2:\n\t xg = numpy.asarray(args[0])\n\t if len(xg.shape) < 1 or len(xg.shape) > 2:\n\t\traise ValueError, \"xg must be 1D or 2D array\"\n\t yg = numpy.asarray(args[1])\n\t if len(yg.shape) != len(xg.shape):\n\t\traise ValueError, \"yg must have same number of dimensions as xg\"\n\t args = args[2:]\n\t # wrap only relevant if xg and yg specified.\n\t if len(args) > 0:\n\t if type(args[0]) == types.IntType:\n\t wrap = args[0]\n\t args = args[1:]\n\t if len(xg.shape) == 2 and len(yg.shape) == 2 and \\\n\t z.shape == xg.shape and z.shape == yg.shape:\n\t\t# handle wrap\n\t\tif wrap == 1:\n\t\t z = numpy.resize(z, (z.shape[0]+1, z.shape[1]))\n\t\t xg = numpy.resize(xg, (xg.shape[0]+1, xg.shape[1]))\n\t\t yg = numpy.resize(yg, (yg.shape[0]+1, yg.shape[1]))\n\t\telif wrap == 2:\n\t\t z = numpy.transpose(numpy.resize( \\\n\t\t numpy.transpose(z), (z.shape[1]+1, z.shape[0])))\n\t\t xg = numpy.transpose(numpy.resize( \\\n\t\t numpy.transpose(xg), (xg.shape[1]+1, xg.shape[0])))\n\t\t yg = numpy.transpose(numpy.resize( \\\n\t\t numpy.transpose(yg), (yg.shape[1]+1, yg.shape[0])))\n\t\telif wrap != 0:\n\t\t raise ValueError, \"Invalid wrap specifier, must be 0, 1 or 2.\"\n\t elif wrap != 0:\n\t\t raise ValueError, \"Non-zero wrap specified and xg and yg are not 2D arrays\"\n\t else:\n\t\t raise ValueError, \"Specified wrap is not an integer\"\n\t pltr_data = (xg, yg)\n else:\n\t# default is identity transformation\n\tpltr = pltr0\n\tpltr_data = None\n if len(args) > 0:\n\traise ValueError, \"Too many arguments for plshade\"\n\n _plshade(z, xmin, xmax, ymin, ymax, \\\n shade_min, shade_max, sh_cmap, sh_color, sh_width, \\\n min_color, min_width, max_color, max_width, rect, pltr, pltr_data)\nplshade.__doc__ = _plshade.__doc__\n\n# Redefine plscmap1l to have the user-friendly interface\n# Allowable syntaxes:\n\n# plscmap1l(itype, pos, coord1, coord2, coord3[, rev])\n \n_plscmap1l = plscmap1l\ndef plscmap1l(itype, pos, coord1, coord2, coord3, *args):\n\n pos = numpy.asarray(pos)\n if len(pos.shape) != 1:\n\traise ValueError, \"Expected 1D pos array\"\n\t\t\n if len(args) == 0:\n\t# Default rev\n\trev = numpy.zeros(pos.shape[0]-1,dtype=\"int\")\n elif len(args) == 1:\n\trev = numpy.asarray(args[0])\n else:\n\traise ValueError, \"Too many arguments to plscmap1l\"\n _plscmap1l(itype, pos, coord1, coord2, coord3, rev)\nplscmap1l.__doc__ = _plscmap1l.__doc__\n","old_contents":"","returncode":1,"stderr":"error: pathspec 'bindings\/python\/plplot.py.numpy' did not match any file(s) known to git\n","license":"lgpl-2.1","lang":"NumPy"}