gentoo/dev-python/pytables/files/pytables-3.1.1-numpy19-backport.patch
Robin H. Johnson 56bd759df1
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.

This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.

Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
2015-08-08 17:38:18 -07:00

52 lines
1.6 KiB
Diff

From 854d5798ca9fd78c00e18710de2e93202f675f3e Mon Sep 17 00:00:00 2001
From: Antonio Valentino <antonio.valentino@tiscali.it>
Date: Sun, 6 Jul 2014 21:21:39 +0200
Subject: [PATCH] Fix a compatibility problem with numpy 1.9 (close: #362)
---
RELEASE_NOTES.txt | 6 ++++++
tables/table.py | 6 +++++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt
index f219eb3..1da20e2 100644
--- a/RELEASE_NOTES.txt
+++ b/RELEASE_NOTES.txt
@@ -19,6 +19,12 @@ Improvements
requiring strict access alignment.
+Bugs fixed
+----------
+
+- Fixed compatibitily problems with numpy 1.9 (closes :issue:`362`)
+
+
Changes from 3.1.0 to 3.1.1
===========================
diff --git a/tables/table.py b/tables/table.py
index 235f599..ffe8fd6 100644
--- a/tables/table.py
+++ b/tables/table.py
@@ -3406,6 +3406,10 @@ def _getindex(self):
associated with this column (None if the column is not
indexed).""")
+ @lazyattr
+ def _itemtype(self):
+ return self.descr._v_dtypes[self.name]
+
def _getshape(self):
return (self.table.nrows,) + self.descr._v_dtypes[self.name].shape
@@ -3529,7 +3533,7 @@ def __iter__(self):
table = self.table
itemsize = self.dtype.itemsize
nrowsinbuf = table._v_file.params['IO_BUFFER_SIZE'] // itemsize
- buf = numpy.empty((nrowsinbuf, ), self.dtype)
+ buf = numpy.empty((nrowsinbuf, ), self._itemtype)
max_row = len(self)
for start_row in xrange(0, len(self), nrowsinbuf):
end_row = min(start_row + nrowsinbuf, max_row)