-
Notifications
You must be signed in to change notification settings - Fork 7
/
MIGRATING_TO_2.x.html
396 lines (371 loc) · 30 KB
/
MIGRATING_TO_2.x.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
<!DOCTYPE html>
<html class="writer-html5" lang="en" data-content_root="./">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Migrating from PyTables 1.x to 2.x — PyTables 3.10.1 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="_static/graphviz.css?v=fd3f3429" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script src="_static/documentation_options.js?v=5ca81ab5"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Release notes for PyTables 3.10 series" href="release-notes/RELEASE_NOTES_v3.10.x.html" />
<link rel="prev" title="PyTables Release Notes" href="release_notes.html" />
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-111342564-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-111342564-1');
</script>
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html">
<img src="_static/logo-pytables-small.png" class="logo" alt="Logo"/>
</a>
<div class="version">
3.10.1
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="usersguide/index.html">User’s Guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="cookbook/index.html">Cookbook</a></li>
<li class="toctree-l1"><a class="reference internal" href="FAQ.html">FAQ</a></li>
<li class="toctree-l1"><a class="reference internal" href="other_material.html">Other Material</a></li>
<li class="toctree-l1"><a class="reference internal" href="MIGRATING_TO_3.x.html">Migrating from 2.x to 3.x</a></li>
<li class="toctree-l1"><a class="reference internal" href="downloads.html">Downloads</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="release_notes.html">Release Notes</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="release_notes.html#migration">Migration</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="MIGRATING_TO_3.x.html">Migrating from 2.x to 3.x</a></li>
<li class="toctree-l3 current"><a class="current reference internal" href="#">Migrating from 1.x to 2.x</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#new-type-system">New type system</a></li>
<li class="toctree-l4"><a class="reference internal" href="#important-changes-in-atom-specification">Important changes in <code class="docutils literal notranslate"><span class="pre">Atom</span></code> specification</a></li>
<li class="toctree-l4"><a class="reference internal" href="#new-query-system">New query system</a></li>
<li class="toctree-l4"><a class="reference internal" href="#new-indexing-system">New indexing system</a></li>
<li class="toctree-l4"><a class="reference internal" href="#new-meanings-for-atom-shape-and-array-shape-argument">New meanings for atom shape and <code class="docutils literal notranslate"><span class="pre">*Array</span></code> shape argument</a></li>
<li class="toctree-l4"><a class="reference internal" href="#new-argument-chunkshape-of-chunked-leaves">New argument <code class="docutils literal notranslate"><span class="pre">chunkshape</span></code> of chunked leaves</a></li>
<li class="toctree-l4"><a class="reference internal" href="#new-flavor-specification">New flavor specification</a></li>
<li class="toctree-l4"><a class="reference internal" href="#system-attributes-can-be-deleted-now">System attributes can be deleted now</a></li>
<li class="toctree-l4"><a class="reference internal" href="#byteorder-issues">Byteorder issues</a></li>
<li class="toctree-l4"><a class="reference internal" href="#tunable-internal-buffer-sizes">Tunable internal buffer sizes</a></li>
<li class="toctree-l4"><a class="reference internal" href="#changes-to-module-names">Changes to module names</a></li>
<li class="toctree-l4"><a class="reference internal" href="#other-changes">Other changes</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="release_notes.html#pytables">PyTables</a></li>
<li class="toctree-l2"><a class="reference internal" href="release_notes.html#pytables-pro">PyTables Pro</a></li>
<li class="toctree-l2"><a class="reference internal" href="release_notes.html#release-timeline">Release timeline</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="project_pointers.html">Project pointers</a></li>
<li class="toctree-l1"><a class="reference internal" href="development.html">Development</a></li>
<li class="toctree-l1"><a class="reference internal" href="dev_team.html">Development Team</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">PyTables</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item"><a href="release_notes.html">PyTables Release Notes</a></li>
<li class="breadcrumb-item active">Migrating from PyTables 1.x to 2.x</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/MIGRATING_TO_2.x.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="migrating-from-pytables-1-x-to-2-x">
<h1>Migrating from PyTables 1.x to 2.x<a class="headerlink" href="#migrating-from-pytables-1-x-to-2-x" title="Link to this heading">¶</a></h1>
<dl class="field-list simple">
<dt class="field-odd">Author<span class="colon">:</span></dt>
<dd class="field-odd"><p>Francesc Alted i Abad</p>
</dd>
<dt class="field-even">Contact<span class="colon">:</span></dt>
<dd class="field-even"><p><a class="reference external" href="mailto:faltet%40pytables.com">faltet<span>@</span>pytables<span>.</span>com</a></p>
</dd>
<dt class="field-odd">Author<span class="colon">:</span></dt>
<dd class="field-odd"><p>Ivan Vilata i Balaguer</p>
</dd>
<dt class="field-even">Contact<span class="colon">:</span></dt>
<dd class="field-even"><p><a class="reference external" href="mailto:ivan%40selidor.net">ivan<span>@</span>selidor<span>.</span>net</a></p>
</dd>
</dl>
<p>Next are described a series of issues that you must have in mind when
migrating from PyTables 1.x to PyTables 2.x series.</p>
<section id="new-type-system">
<h2>New type system<a class="headerlink" href="#new-type-system" title="Link to this heading">¶</a></h2>
<p>In PyTables 2.x all the data types for leaves are described through a couple
of classes:</p>
<ul class="simple">
<li><dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">Atom</span></code>: Describes homogeneous types of the atomic components in <code class="docutils literal notranslate"><span class="pre">*Array</span></code></dt><dd><p>objects (<code class="docutils literal notranslate"><span class="pre">Array</span></code>, <code class="docutils literal notranslate"><span class="pre">CArray</span></code>, <code class="docutils literal notranslate"><span class="pre">EArray</span></code> and <code class="docutils literal notranslate"><span class="pre">VLArray</span></code>).</p>
</dd>
</dl>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">Description</span></code>: Describes (possibly nested) heterogeneous types in
<code class="docutils literal notranslate"><span class="pre">Table</span></code> objects.</p></li>
</ul>
<p>So, in order to upgrade to the new type system, you must perform the next
replacements:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">*Array.stype</span></code> –> <code class="docutils literal notranslate"><span class="pre">*Array.atom.type</span></code> (PyTables type)</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">*Array.type</span></code> –> <code class="docutils literal notranslate"><span class="pre">*Array.atom.dtype</span></code> (NumPy type)</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">*Array.itemsize</span></code> –> <code class="docutils literal notranslate"><span class="pre">*Array.atom.itemsize</span></code> (the size of the item)</p></li>
</ul>
<p>Furthermore, the PyTables types (previously called “string types”) have
changed to better adapt to NumPy conventions. The next changes have been
applied:</p>
<ul class="simple">
<li><p>PyTables types are now written in lower case, so ‘Type’ becomes ‘type’. For
example, ‘Int64’ becomes now ‘int64’.</p></li>
<li><p>‘CharType’ –> ‘string’</p></li>
<li><p>‘Complex32’, ‘Complex64’ –> ‘complex64’, ‘complex128’. Note that the
numeric part of a ‘complex’ type refers now to the <em>size in bits</em> of the
type and not to the precision, as before.</p></li>
</ul>
<p>See Appendix I of the Users’ Manual on supported data types for more
information on the new PyTables types.</p>
</section>
<section id="important-changes-in-atom-specification">
<h2>Important changes in <code class="docutils literal notranslate"><span class="pre">Atom</span></code> specification<a class="headerlink" href="#important-changes-in-atom-specification" title="Link to this heading">¶</a></h2>
<ul>
<li><p>The <code class="docutils literal notranslate"><span class="pre">dtype</span></code> argument of <code class="docutils literal notranslate"><span class="pre">EnumAtom</span></code> and <code class="docutils literal notranslate"><span class="pre">EnumCol</span></code> constructors
has been replaced by the <code class="docutils literal notranslate"><span class="pre">base</span></code> argument, which can take a
full-blown atom, although it accepts bare PyTables types as well.
This is a <em>mandatory</em> argument now.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">vlstring</span></code> pseudo-atoms used in <code class="docutils literal notranslate"><span class="pre">VLArray</span></code> nodes do no longer imply UTF-8
(nor any other) encoding, they only store and load <em>raw strings of bytes</em>.
All encoding and decoding is left to the user. Be warned that reading old
files may yield raw UTF-8 encoded strings, which may be converted back to
Unicode in this way:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">unistr</span> <span class="o">=</span> <span class="n">vlarray</span><span class="p">[</span><span class="n">index</span><span class="p">]</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s1">'utf-8'</span><span class="p">)</span>
</pre></div>
</div>
<p>If you need to work with variable-length Unicode strings, you may want to
use the new <code class="docutils literal notranslate"><span class="pre">vlunicode</span></code> pseudo-atom, which fully supports Unicode strings
with no encoding hassles.</p>
</li>
<li><p>Finally, <code class="docutils literal notranslate"><span class="pre">Atom</span></code> and <code class="docutils literal notranslate"><span class="pre">Col</span></code> are now abstract classes, so you can’t use
them to create atoms or column definitions of an arbitrary type. If you
know the particular type you need, use the proper subclass; otherwise, use
the <code class="docutils literal notranslate"><span class="pre">Atom.from_*()</span></code> or <code class="docutils literal notranslate"><span class="pre">Col.from_*()</span></code> factory methods. See the section
on declarative classes in the reference.</p>
<p>You are also advised to avoid using the inheritance of atoms to check for
their kind or type; for that purpose, use their <code class="docutils literal notranslate"><span class="pre">kind</span></code> and <code class="docutils literal notranslate"><span class="pre">type</span></code>
attributes.</p>
</li>
</ul>
</section>
<section id="new-query-system">
<h2>New query system<a class="headerlink" href="#new-query-system" title="Link to this heading">¶</a></h2>
<ul>
<li><p>In-kernel conditions, since they are based now in Numexpr, must be written
<em>as strings</em>. For example, a condition that in 1.x was stated as:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">result</span> <span class="o">=</span> <span class="p">[</span><span class="n">row</span><span class="p">[</span><span class="s1">'col2'</span><span class="p">]</span> <span class="k">for</span> <span class="n">row</span> <span class="ow">in</span> <span class="n">table</span><span class="o">.</span><span class="n">where</span><span class="p">(</span><span class="n">table</span><span class="o">.</span><span class="n">cols</span><span class="o">.</span><span class="n">col1</span> <span class="o">==</span> <span class="mi">1</span><span class="p">)]</span>
</pre></div>
</div>
<p>now should read:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">result</span> <span class="o">=</span> <span class="p">[</span><span class="n">row</span><span class="p">[</span><span class="s1">'col2'</span><span class="p">]</span> <span class="k">for</span> <span class="n">row</span> <span class="ow">in</span> <span class="n">table</span><span class="o">.</span><span class="n">where</span><span class="p">(</span><span class="s1">'col1 == 1'</span><span class="p">)]</span>
</pre></div>
</div>
<p>That means that complex selections are possible now:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">result</span> <span class="o">=</span> <span class="p">[</span> <span class="n">row</span><span class="p">[</span><span class="s1">'col2'</span><span class="p">]</span> <span class="k">for</span> <span class="n">row</span> <span class="ow">in</span>
<span class="n">table</span><span class="o">.</span><span class="n">where</span><span class="p">(</span><span class="s1">'(col1 == 1) & (col3**4 > 1)'</span><span class="p">)</span> <span class="p">]</span>
</pre></div>
</div>
</li>
<li><p>For the same reason, conditions for indexed columns must be written as
strings as well.</p></li>
</ul>
</section>
<section id="new-indexing-system">
<h2>New indexing system<a class="headerlink" href="#new-indexing-system" title="Link to this heading">¶</a></h2>
<p>The indexing system has been totally rewritten from scratch for PyTables 2.0
Pro Edition. The new indexing system has been included into PyTables with
release 2.3. Due to this, your existing indexes created with PyTables 1.x
will be useless, and although you will be able to continue using the actual
data in files, you won’t be able to take advantage of any improvement in
speed.</p>
<p>You will be offered the possibility to automatically re-create the indexes
in PyTables 1.x format to the new 2.0 format by using the <code class="docutils literal notranslate"><span class="pre">ptrepack</span></code>
utility.</p>
</section>
<section id="new-meanings-for-atom-shape-and-array-shape-argument">
<h2>New meanings for atom shape and <code class="docutils literal notranslate"><span class="pre">*Array</span></code> shape argument<a class="headerlink" href="#new-meanings-for-atom-shape-and-array-shape-argument" title="Link to this heading">¶</a></h2>
<p>With PyTables 1.x, the atom shape was used for different goals depending on
the context it was used. For example, in <code class="docutils literal notranslate"><span class="pre">createEArray()</span></code>, the shape of the
atom was used to specify the <em>dataset shape</em> of the object on disk, while in
<code class="docutils literal notranslate"><span class="pre">CArray</span></code> the same atom shape was used to specify the <em>chunk shape</em> of the
dataset on disk. Moreover, for <code class="docutils literal notranslate"><span class="pre">VLArray</span></code> objects, the very same atom shape
specified the <em>type shape</em> of the data type. As you see, all of these was
quite a mess.</p>
<p>Starting with PyTables 2.x, an <code class="docutils literal notranslate"><span class="pre">Atom</span></code> only specifies properties of the data
type (à la <code class="docutils literal notranslate"><span class="pre">VLArray</span></code> in 1.x). This lets the door open for specifying
multidimensional data types (that can be part of another layer of
multidimensional datasets) in a consistent way along all the <code class="docutils literal notranslate"><span class="pre">*Array</span></code>
objects in PyTables.</p>
<p>As a consequence of this, <code class="docutils literal notranslate"><span class="pre">File.createCArray()</span></code> and <code class="docutils literal notranslate"><span class="pre">File.createVLArray()</span></code>
methods have received new parameters in order to make possible to specify the
shapes of the datasets as well as chunk sizes (in fact, it is possible now to
specify the latter for all the chunked leaves, see below). Please have this
in mind during the migration process.</p>
<p>Another consequence is that, now that the meaning of the atom shape is clearly
defined, it has been chosen as the main object to describe homogeneous data
types in PyTables. See the Users’ Manual for more info on this.</p>
</section>
<section id="new-argument-chunkshape-of-chunked-leaves">
<h2>New argument <code class="docutils literal notranslate"><span class="pre">chunkshape</span></code> of chunked leaves<a class="headerlink" href="#new-argument-chunkshape-of-chunked-leaves" title="Link to this heading">¶</a></h2>
<p>It is possible now to specify the chunk shape for all the chunked leaves in
PyTables (all except <code class="docutils literal notranslate"><span class="pre">Array</span></code>). With PyTables 1.x this value was
automatically calculated so as to achieve decent results in most of the
situations. However, the user may be interested in specifying its own chunk
shape based on her own needs (although this should be done only by advanced
users).</p>
<p>Of course, if this parameter is not specified, a sensible default is
calculated for the size of the leave (which is recommended).</p>
<p>A new attribute called <code class="docutils literal notranslate"><span class="pre">chunkshape</span></code> has been added to all leaves. It is
read-only (you can’t change the size of chunks once you have created a leaf),
but it can be useful for inspection by advanced users.</p>
</section>
<section id="new-flavor-specification">
<h2>New flavor specification<a class="headerlink" href="#new-flavor-specification" title="Link to this heading">¶</a></h2>
<p>As of 2.x, flavors can <em>only</em> be set through the <code class="docutils literal notranslate"><span class="pre">flavor</span></code> attribute of
leaves, and they are <em>persistent</em>, so changing a flavor requires that the file
be writable.</p>
<p>Flavors can no longer be set through <code class="docutils literal notranslate"><span class="pre">File.create*()</span></code> methods, nor the
<code class="docutils literal notranslate"><span class="pre">flavor</span></code> argument previously found in some <code class="docutils literal notranslate"><span class="pre">Table</span></code> methods, nor through
<code class="docutils literal notranslate"><span class="pre">Atom</span></code> constructors or the <code class="docutils literal notranslate"><span class="pre">_v_flavor</span></code> attribute of descriptions.</p>
</section>
<section id="system-attributes-can-be-deleted-now">
<h2>System attributes can be deleted now<a class="headerlink" href="#system-attributes-can-be-deleted-now" title="Link to this heading">¶</a></h2>
<p>The protection against removing system attributes (like <code class="docutils literal notranslate"><span class="pre">FILTERS</span></code>,
<code class="docutils literal notranslate"><span class="pre">FLAVOR</span></code> or <code class="docutils literal notranslate"><span class="pre">CLASS</span></code>, to name only a few) has been completely removed. It
is now the responsibility of the user to make a proper use of this freedom.
With this, users can get rid of all proprietary PyTables attributes if they
want to (for example, for making a file to look more like an HDF5 native one).</p>
</section>
<section id="byteorder-issues">
<h2>Byteorder issues<a class="headerlink" href="#byteorder-issues" title="Link to this heading">¶</a></h2>
<p>Now, all the data coming from reads and internal buffers is always converted
on-the-fly, if needed, to the <em>native</em> byteorder. This represents a big
advantage in terms of speed when operating with objects coming from files that
have been created in machines with a byte ordering different from native.</p>
<p>Besides, all leaf constructors have received a new <code class="docutils literal notranslate"><span class="pre">byteorder</span></code> parameter
that allows specifying the byteorder of data on disk. In particular, a
<code class="docutils literal notranslate"><span class="pre">_v_byteorder</span></code> entry in a Table description is no longer honored and you
should use the aforementioned <code class="docutils literal notranslate"><span class="pre">byteorder</span></code> parameter.</p>
</section>
<section id="tunable-internal-buffer-sizes">
<h2>Tunable internal buffer sizes<a class="headerlink" href="#tunable-internal-buffer-sizes" title="Link to this heading">¶</a></h2>
<p>You can change the size of the internal buffers for I/O purposes of PyTables
by changing the value of the new public attribute <code class="docutils literal notranslate"><span class="pre">nrowsinbuf</span></code> that is
present in all leaves. By default, this contains a sensible value so as to
achieve a good balance between speed and memory consumption. Be careful when
changing it, if you don’t want to get unwanted results (very slow I/O, huge
memory consumption…).</p>
</section>
<section id="changes-to-module-names">
<h2>Changes to module names<a class="headerlink" href="#changes-to-module-names" title="Link to this heading">¶</a></h2>
<p>If your application is directly accessing modules under the <code class="docutils literal notranslate"><span class="pre">tables</span></code>
package, you need to know that <em>the names of all modules are now all in
lowercase</em>. This allows one to tell apart the <code class="docutils literal notranslate"><span class="pre">tables.Array</span></code> <em>class</em> from
the <code class="docutils literal notranslate"><span class="pre">tables.array</span></code> <em>module</em> (which was also called <code class="docutils literal notranslate"><span class="pre">tables.Array</span></code> before).
This includes subpackages like <code class="docutils literal notranslate"><span class="pre">tables.nodes.FileNode</span></code>.</p>
<p>On top of that, more-or-less independent modules have also been renamed and
some of them grouped into subpackages. The most important are:</p>
<ul class="simple">
<li><p>The <code class="docutils literal notranslate"><span class="pre">tables.netcdf3</span></code> subpackage replaces the old <code class="docutils literal notranslate"><span class="pre">tables.NetCDF</span></code> module.</p></li>
<li><p>The <code class="docutils literal notranslate"><span class="pre">tables.nra</span></code> subpackage replaces the old <code class="docutils literal notranslate"><span class="pre">nestedrecords.py</span></code> with the
implementation of the <code class="docutils literal notranslate"><span class="pre">NestedRecArray</span></code> class.</p></li>
</ul>
<p>Also, the <code class="docutils literal notranslate"><span class="pre">tables.misc</span></code> package includes utility modules which do not depend
on PyTables.</p>
</section>
<section id="other-changes">
<h2>Other changes<a class="headerlink" href="#other-changes" title="Link to this heading">¶</a></h2>
<ul>
<li><p><code class="docutils literal notranslate"><span class="pre">Filters.complib</span></code> is <code class="docutils literal notranslate"><span class="pre">None</span></code> for filter properties created with
<code class="docutils literal notranslate"><span class="pre">complevel=0</span></code> (i.e. disabled compression, which is the default).</p></li>
<li><p>‘non-relevant’ –> ‘irrelevant’ (applied to byteorders)</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">Table.colstypes</span></code> –> <code class="docutils literal notranslate"><span class="pre">Table.coltypes</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">Table.coltypes</span></code> –> <code class="docutils literal notranslate"><span class="pre">Table.coldtypes</span></code></p></li>
<li><p>Added <code class="docutils literal notranslate"><span class="pre">Table.coldescr</span></code>, dictionary of the <code class="docutils literal notranslate"><span class="pre">Col</span></code> descriptions.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">Table.colshapes</span></code> has disappeared. You can get it this way:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">colshapes</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">(</span> <span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">col</span><span class="o">.</span><span class="n">shape</span><span class="p">)</span>
<span class="k">for</span> <span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">col</span><span class="p">)</span> <span class="ow">in</span> <span class="n">table</span><span class="o">.</span><span class="n">coldescr</span><span class="o">.</span><span class="n">iteritems</span><span class="p">()</span> <span class="p">)</span>
</pre></div>
</div>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">Table.colitemsizes</span></code> has disappeared. You can get it this way:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">colitemsizes</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">(</span> <span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">col</span><span class="o">.</span><span class="n">itemsize</span><span class="p">)</span>
<span class="k">for</span> <span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">col</span><span class="p">)</span> <span class="ow">in</span> <span class="n">table</span><span class="o">.</span><span class="n">coldescr</span><span class="o">.</span><span class="n">iteritems</span><span class="p">()</span> <span class="p">)</span>
</pre></div>
</div>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">Description._v_totalsize</span></code> –> <code class="docutils literal notranslate"><span class="pre">Description._v_itemsize</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">Description._v_itemsizes</span></code> and <code class="docutils literal notranslate"><span class="pre">Description._v_totalsizes</span></code> have
disappeared.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">Leaf._v_chunksize</span></code> –> <code class="docutils literal notranslate"><span class="pre">Leaf.chunkshape</span></code></p></li>
</ul>
<hr class="docutils" />
<blockquote>
<div><p><strong>Enjoy data!</strong></p>
<p class="attribution">—The PyTables Team</p>
</div></blockquote>
</section>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="release_notes.html" class="btn btn-neutral float-left" title="PyTables Release Notes" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="release-notes/RELEASE_NOTES_v3.10.x.html" class="btn btn-neutral float-right" title="Release notes for PyTables 3.10 series" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>© Copyright 2011–2024, PyTables maintainers.</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>