Evan
2016-07-18 16:42:50 UTC
I am using Python 3.4, HDF5 1.10.0. For some reason, I seem to be having
problems with `createArray()`.
import numpy as np
import tables as tb
# Create a new file
f = tb.openFile("atest.h5", "w")
# Create a numpy array
a = np.arange(100).reshape(20,5)
# Save the array
f.createArray(f.root, "array1", a)
*Here is the output error I receive:*
---------------------------------------------------------------------------
HDF5ExtError Traceback (most recent call
last)
<ipython-input-15-3679ab0c3e43> in <module>()
9
10 # Save the array
---> 11 f.createArray(f.root, "array1", a)
/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/tables/_past.py
in oldfunc(*args, **kwargs)
33 def oldfunc(*args, **kwargs):
34 warn(warnmsg, DeprecationWarning, stacklevel=2)
---> 35 return obj(*args, **kwargs)
36 oldfunc.__doc__ = (
37 obj.__doc__ or '') + "\n\n.. warning::\n\n " +
warnmsg + "\n"
/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/tables/file.py
in create_array(self, where, name, obj, title, byteorder, createparents,
atom, shape)
1150 parentnode = self._get_or_create_path(where,
createparents)
1151 return Array(parentnode, name,
-> 1152 obj=obj, title=title, byteorder=byteorder)
1153
1154 createArray = previous_api(create_array)
/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/tables/array.py
in __init__(self, parentnode, name, obj, title, byteorder, _log, _atom)
186 # Ordinary arrays have no filters: leaf is created with
default ones.
187 super(Array, self).__init__(parentnode, name, new,
Filters(),
--> 188 byteorder, _log)
189
190 def _g_create(self):
/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/tables/leaf.py
in __init__(self, parentnode, name, new, filters, byteorder, _log)
260 # is a lazy property that automatically handles their
loading.
261
--> 262 super(Leaf, self).__init__(parentnode, name, _log)
263
264 def __len__(self):
/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/tables/node.py
in __init__(self, parentnode, name, _log)
265 # Create or open the node and get its object ID.
266 if new:
--> 267 self._v_objectid = self._g_create()
268 else:
269 self._v_objectid = self._g_open()
/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/tables/array.py
in _g_create(self)
218 # on
219 (self._v_objectid, self.shape, self.atom) =
self._create_array(
--> 220 nparr, self._v_new_title, self.atom)
221 except: # XXX
222 # Problems creating the Array on disk. Close node
and re-raise.
tables/hdf5extension.pyx in tables.hdf5extension.Array._create_array
(tables/hdf5extension.c:14170)()
HDF5ExtError: Problems creating the Array.
problems with `createArray()`.
import numpy as np
import tables as tb
# Create a new file
f = tb.openFile("atest.h5", "w")
# Create a numpy array
a = np.arange(100).reshape(20,5)
# Save the array
f.createArray(f.root, "array1", a)
*Here is the output error I receive:*
---------------------------------------------------------------------------
HDF5ExtError Traceback (most recent call
last)
<ipython-input-15-3679ab0c3e43> in <module>()
9
10 # Save the array
---> 11 f.createArray(f.root, "array1", a)
/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/tables/_past.py
in oldfunc(*args, **kwargs)
33 def oldfunc(*args, **kwargs):
34 warn(warnmsg, DeprecationWarning, stacklevel=2)
---> 35 return obj(*args, **kwargs)
36 oldfunc.__doc__ = (
37 obj.__doc__ or '') + "\n\n.. warning::\n\n " +
warnmsg + "\n"
/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/tables/file.py
in create_array(self, where, name, obj, title, byteorder, createparents,
atom, shape)
1150 parentnode = self._get_or_create_path(where,
createparents)
1151 return Array(parentnode, name,
-> 1152 obj=obj, title=title, byteorder=byteorder)
1153
1154 createArray = previous_api(create_array)
/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/tables/array.py
in __init__(self, parentnode, name, obj, title, byteorder, _log, _atom)
186 # Ordinary arrays have no filters: leaf is created with
default ones.
187 super(Array, self).__init__(parentnode, name, new,
Filters(),
--> 188 byteorder, _log)
189
190 def _g_create(self):
/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/tables/leaf.py
in __init__(self, parentnode, name, new, filters, byteorder, _log)
260 # is a lazy property that automatically handles their
loading.
261
--> 262 super(Leaf, self).__init__(parentnode, name, _log)
263
264 def __len__(self):
/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/tables/node.py
in __init__(self, parentnode, name, _log)
265 # Create or open the node and get its object ID.
266 if new:
--> 267 self._v_objectid = self._g_create()
268 else:
269 self._v_objectid = self._g_open()
/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/tables/array.py
in _g_create(self)
218 # on
219 (self._v_objectid, self.shape, self.atom) =
self._create_array(
--> 220 nparr, self._v_new_title, self.atom)
221 except: # XXX
222 # Problems creating the Array on disk. Close node
and re-raise.
tables/hdf5extension.pyx in tables.hdf5extension.Array._create_array
(tables/hdf5extension.c:14170)()
HDF5ExtError: Problems creating the Array.
--
You received this message because you are subscribed to the Google Groups "pytables-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pytables-users+***@googlegroups.com.
To post to this group, send an email to pytables-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "pytables-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pytables-users+***@googlegroups.com.
To post to this group, send an email to pytables-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.