summaryrefslogtreecommitdiff
path: root/numpy/core/numeric.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-06-01 22:43:05 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-06-01 22:43:05 +0000
commit24ed9eb8234e25ba435d8d6fb34e7c275b4c88aa (patch)
treeb0fcc28a9a475fb2a9dc97a93b21ceee4f559f9c /numpy/core/numeric.py
parentce2f12baf0e3ae608e520dd345c4517efe36aff4 (diff)
downloadnumpy-24ed9eb8234e25ba435d8d6fb34e7c275b4c88aa.tar.gz
Fix up comments and checks in buffer setting and error-function setting.
Diffstat (limited to 'numpy/core/numeric.py')
-rw-r--r--numpy/core/numeric.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py
index c27bb19ae..c99ca75a8 100644
--- a/numpy/core/numeric.py
+++ b/numpy/core/numeric.py
@@ -453,8 +453,10 @@ def geterr():
def setbufsize(size):
if size > 10e6:
- raise ValueError, "Very big buffers.. %s" % size
-
+ raise ValueError, "Buffer size too big... %s" % size
+ if size < 5:
+ raise ValueError, "Buffer size too small... %s" %size
+
pyvals = umath.geterrobj()
old = getbufsize()
pyvals[0] = size
@@ -465,7 +467,7 @@ def getbufsize():
return umath.geterrobj()[0]
def seterrcall(func):
- if not callable(func):
+ if func is not None and not callable(func):
raise ValueError, "Only callable can be used as callback"
pyvals = umath.geterrobj()
old = geterrcall()