index
int64
0
731k
package
stringlengths
2
98
name
stringlengths
1
76
docstring
stringlengths
0
281k
code
stringlengths
4
8.19k
signature
stringlengths
2
42.8k
embed_func_code
listlengths
768
768
727,979
tables.array
__next__
Get the next element of the array during an iteration. The element is returned as an object of the current flavor.
def __next__(self): """Get the next element of the array during an iteration. The element is returned as an object of the current flavor. """ # this could probably be sped up for long iterations by reusing the # listarr buffer if self._nrowsread >= self._stop: self._init = False ...
(self)
[ 0.0237584225833416, -0.048066381365060806, -0.07517699897289276, 0.04319379851222038, 0.010285547003149986, 0.030939070507884026, 0.010487044230103493, 0.009268898516893387, -0.00640213442966342, -0.032844141125679016, -0.0005309352418407798, -0.02745865471661091, -0.014791769906878471, 0....
727,980
tables.array
__repr__
This provides more metainfo in addition to standard __str__
"""Here is defined the Array class.""" import operator import sys import numpy as np from . import hdf5extension from .filters import Filters from .flavor import flavor_of, array_as_internal, internal_to_flavor from .leaf import Leaf from .utils import (is_idx, convert_to_np_atom2, SizeType, lazyattr, ...
(self)
[ 0.036780498921871185, -0.02535640262067318, -0.05000736936926842, 0.052162859588861465, 0.020516347140073776, -0.02120218425989151, -0.08347625285387039, 0.001316563575528562, -0.04620587080717087, -0.06760400533676147, -0.005065402016043663, -0.045147720724344254, 0.02492530457675457, 0.0...
727,981
tables.array
__setitem__
Set a row, a range of rows or a slice in the array. It takes different actions depending on the type of the key parameter: if it is an integer, the corresponding array row is set to value (the value is broadcast when needed). If key is a slice, the row slice determined by it is set to ...
def __setitem__(self, key, value): """Set a row, a range of rows or a slice in the array. It takes different actions depending on the type of the key parameter: if it is an integer, the corresponding array row is set to value (the value is broadcast when needed). If key is a slice, the row slice de...
(self, key, value)
[ 0.0259493887424469, -0.023314528167247772, -0.05425418168306351, 0.043475206941366196, -0.010858820751309395, -0.02704724669456482, -0.049343761056661606, 0.0015457351692020893, -0.017835214734077454, -0.06044211611151695, -0.008523375727236271, -0.02988171949982643, 0.02457207441329956, 0...
727,982
tables.leaf
__str__
The string representation for this object is its pathname in the HDF5 object tree plus some additional metainfo.
def csformula(expected_mb): """Return the fitted chunksize for expected_mb.""" # For a basesize of 8 KB, this will return: # 8 KB for datasets <= 1 MB # 1 MB for datasets >= 10 TB basesize = 8 * 1024 # 8 KB is a good minimum return basesize * int(2**math.log10(expected_mb))
(self)
[ 0.0036258019972592592, -0.02211325615644455, -0.04396916925907135, 0.0014291817788034678, -0.016993936151266098, 0.03321583941578865, -0.03529297560453415, -0.022002965211868286, -0.012977521866559982, -0.0437118224799633, 0.061615657061338425, 0.0052388012409210205, -0.03593633696436882, ...
727,983
tables.leaf
_calc_chunkshape
Calculate the shape for the HDF5 chunk.
def _calc_chunkshape(self, expectedrows, rowsize, itemsize): """Calculate the shape for the HDF5 chunk.""" # In case of a scalar shape, return the unit chunksize if self.shape == (): return (SizeType(1),) # Compute the chunksize MB = 1024 * 1024 expected_mb = (expectedrows * rowsize) // ...
(self, expectedrows, rowsize, itemsize)
[ -0.001928270561620593, -0.03778720647096634, -0.1013437956571579, 0.008195765316486359, -0.002664608880877495, -0.0008194534457288682, -0.0028320704586803913, 0.024390283972024918, -0.05256322771310806, -0.05500619485974312, 0.04168807715177536, 0.031620681285858154, -0.01656884327530861, ...
727,984
tables.leaf
_calc_nrowsinbuf
Calculate the number of rows that fits on a PyTables buffer.
def _calc_nrowsinbuf(self): """Calculate the number of rows that fits on a PyTables buffer.""" params = self._v_file.params # Compute the nrowsinbuf rowsize = self.rowsize buffersize = params['IO_BUFFER_SIZE'] if rowsize != 0: nrowsinbuf = buffersize // rowsize else: nrowsinb...
(self)
[ -0.025584973394870758, -0.03466120734810829, -0.021564988419413567, 0.04155771806836128, -0.017419936135411263, 0.06042484939098358, 0.0022042919881641865, 0.007919371128082275, -0.062282975763082504, -0.05059821531176567, 0.011470358818769455, -0.034732673317193985, -0.08004237711429596, ...
727,985
tables.array
_check_shape
Test that nparr shape is consistent with underlying object. If not, try creating a new nparr object, using broadcasting if necessary.
def _check_shape(self, nparr, slice_shape): """Test that nparr shape is consistent with underlying object. If not, try creating a new nparr object, using broadcasting if necessary. """ if nparr.shape != (slice_shape + self.atom.dtype.shape): # Create an array compliant with the specified sha...
(self, nparr, slice_shape)
[ -0.005014287307858467, -0.003942721989005804, -0.04710335657000542, 0.0016892505809664726, -0.030631743371486664, -0.009355149231851101, -0.014478640630841255, -0.010747501626610756, 0.021440399810671806, -0.04131554067134857, 0.03927706554532051, -0.0012820103438571095, 0.017709260806441307...
727,986
tables.leaf
_f_close
Close this node in the tree. This method has the behavior described in :meth:`Node._f_close`. Besides that, the optional argument flush tells whether to flush pending data to disk or not before closing.
def _f_close(self, flush=True): """Close this node in the tree. This method has the behavior described in :meth:`Node._f_close`. Besides that, the optional argument flush tells whether to flush pending data to disk or not before closing. """ if not self._v_isopen: return # the node is a...
(self, flush=True)
[ 0.018857793882489204, -0.02317359298467636, 0.01728919893503189, 0.07647112756967545, -0.0567467026412487, -0.020365722477436066, -0.05861861631274223, 0.041528742760419846, 0.0034231748431921005, -0.043261997401714325, -0.01484531257301569, -0.08222552388906479, 0.0299159474670887, 0.0270...
727,987
tables.node
_f_copy
Copy this node and return the new node. Creates and returns a copy of the node, maybe in a different place in the hierarchy. newparent can be a Group object (see :ref:`GroupClassDescr`) or a pathname in string form. If it is not specified or None, the current parent group is chosen as t...
def _f_copy(self, newparent=None, newname=None, overwrite=False, recursive=False, createparents=False, **kwargs): """Copy this node and return the new node. Creates and returns a copy of the node, maybe in a different place in the hierarchy. newparent can be a Group object (see :...
(self, newparent=None, newname=None, overwrite=False, recursive=False, createparents=False, **kwargs)
[ -0.02428554557263851, -0.020170655101537704, 0.01633457839488983, 0.028727320954203606, -0.07287586480379105, 0.008200938813388348, -0.0026391062419861555, 0.05687778815627098, 0.05553179606795311, -0.02482394315302372, -0.022516528144478798, -0.011421705596148968, 0.007859633304178715, 0....
727,988
tables.node
_f_delattr
Delete a PyTables attribute from this node. If the named attribute does not exist, an AttributeError is raised.
def _f_delattr(self, name): """Delete a PyTables attribute from this node. If the named attribute does not exist, an AttributeError is raised. """ delattr(self._v_attrs, name)
(self, name)
[ 0.04820198193192482, 0.033413901925086975, 0.04342613369226456, 0.021423103287816048, -0.044040169566869736, -0.012255175039172173, -0.02739291824400425, 0.05065813660621643, -0.014199628494679928, 0.021440159529447556, -0.02410099096596241, 0.0005378162604756653, 0.03605767711997032, 0.02...
727,989
tables.node
_f_getattr
Get a PyTables attribute from this node. If the named attribute does not exist, an AttributeError is raised.
def _f_getattr(self, name): """Get a PyTables attribute from this node. If the named attribute does not exist, an AttributeError is raised. """ return getattr(self._v_attrs, name)
(self, name)
[ 0.05952426791191101, -0.028914209455251694, 0.030660932883620262, 0.0432441271841526, 0.0022258006501942873, -0.0042692977003753185, 0.0432441271841526, 0.008691221475601196, 0.00471021793782711, -0.0019226677250117064, -0.0240301676094532, 0.012769736349582672, 0.04127694293856621, 0.0314...
727,990
tables.node
_f_isvisible
Is this node visible?
def _f_isvisible(self): """Is this node visible?""" self._g_check_open() return isvisiblepath(self._v_pathname)
(self)
[ 0.05192609876394272, -0.034995123744010925, 0.0056742094457149506, 0.037594761699438095, 0.046860139816999435, 0.03111233189702034, 0.04139423370361328, -0.017764192074537277, -0.06839047372341156, 0.048959843814373016, -0.0029266756027936935, -0.046326879411935806, 0.05822522193193436, 0....
727,991
tables.node
_f_move
Move or rename this node. Moves a node into a new parent group, or changes the name of the node. newparent can be a Group object (see :ref:`GroupClassDescr`) or a pathname in string form. If it is not specified or None, the current parent group is chosen as the new parent. newname must...
def _f_move(self, newparent=None, newname=None, overwrite=False, createparents=False): """Move or rename this node. Moves a node into a new parent group, or changes the name of the node. newparent can be a Group object (see :ref:`GroupClassDescr`) or a pathname in string form. If it is not s...
(self, newparent=None, newname=None, overwrite=False, createparents=False)
[ -0.02827279269695282, 0.013587594032287598, -0.048938047140836716, 0.03041123040020466, -0.03909745067358017, -0.028253868222236633, -0.020911268889904022, 0.134437695145607, 0.027553671970963478, -0.051133256405591965, -0.0257558710873127, -0.02250090427696705, 0.05711331218481064, 0.0526...
727,992
tables.node
_f_remove
Remove this node from the hierarchy. If the node has children, recursive removal must be stated by giving recursive a true value; otherwise, a NodeError will be raised. If the node is a link to a Group object, and you are sure that you want to delete it, you can do this by setting the ...
def _f_remove(self, recursive=False, force=False): """Remove this node from the hierarchy. If the node has children, recursive removal must be stated by giving recursive a true value; otherwise, a NodeError will be raised. If the node is a link to a Group object, and you are sure that you want to de...
(self, recursive=False, force=False)
[ 0.03732717037200928, 0.016544310376048088, 0.006868025287985802, 0.03507707640528679, -0.0042538149282336235, -0.014363983646035194, -0.07646837085485458, 0.06418877840042114, 0.03518173098564148, -0.008939334191381931, 0.017215849831700325, 0.009602153673768044, 0.04004821926355362, -0.02...
727,993
tables.node
_f_rename
Rename this node in place. Changes the name of a node to *newname* (a string). If a node with the same newname already exists and overwrite is true, recursively remove it before renaming.
def _f_rename(self, newname, overwrite=False): """Rename this node in place. Changes the name of a node to *newname* (a string). If a node with the same newname already exists and overwrite is true, recursively remove it before renaming. """ self._f_move(newname=newname, overwrite=overwrite)
(self, newname, overwrite=False)
[ -0.03249743580818176, -0.02135998196899891, 0.009914620779454708, 0.042332880198955536, -0.06633207201957703, -0.014902722090482712, -0.016310298815369606, 0.09557448327541351, 0.06277793645858765, -0.001832049572840333, -0.00007202835695352405, -0.00618894025683403, 0.05098947882652283, 0...
727,994
tables.node
_f_setattr
Set a PyTables attribute for this node. If the node already has a large number of attributes, a PerformanceWarning is issued.
def _f_setattr(self, name, value): """Set a PyTables attribute for this node. If the node already has a large number of attributes, a PerformanceWarning is issued. """ setattr(self._v_attrs, name, value)
(self, name, value)
[ 0.01938469335436821, -0.0025834699627012014, 0.031279057264328, 0.03575244918465614, -0.04587826505303383, 0.01081069465726614, 0.0021250774152576923, 0.014053035527467728, -0.03679277375340462, -0.015067351050674915, -0.03644599765539169, -0.007672385312616825, 0.0524669773876667, 0.03238...
727,995
tables.array
_fancy_selection
Performs a NumPy-style fancy selection in `self`. Implements advanced NumPy-style selection operations in addition to the standard slice-and-int behavior. Indexing arguments may be ints, slices or lists of indices. Note: This is a backport from the h5py project.
def _fancy_selection(self, args): """Performs a NumPy-style fancy selection in `self`. Implements advanced NumPy-style selection operations in addition to the standard slice-and-int behavior. Indexing arguments may be ints, slices or lists of indices. Note: This is a backport from the h5py project. ...
(self, args)
[ -0.0032250364311039448, -0.061912767589092255, -0.037024710327386856, 0.02292477898299694, -0.014040435664355755, 0.019989773631095886, -0.0026276239659637213, -0.013227359391748905, -0.059572696685791016, -0.03395088389515877, 0.016112787649035454, 0.03496227040886879, -0.008968626148998737...
727,996
tables.node
_g_check_group
null
def _g_check_group(self, node): # Node must be defined in order to define a Group. # However, we need to know Group here. # Using class_name_dict avoids a circular import. if not isinstance(node, class_name_dict['Node']): raise TypeError("new parent is not a registered node: %s" ...
(self, node)
[ 0.0034802157897502184, 0.02582697942852974, 0.000052241230150684714, 0.07607408612966537, -0.027338039129972458, -0.010221369564533234, 0.037099145352840424, 0.09010784327983856, 0.07075931876897812, -0.023291176185011864, 0.05742030218243599, -0.0480065681040287, 0.05655187740921974, -0.0...
727,997
tables.node
_g_check_name
Check validity of name for this particular kind of node. This is invoked once the standard HDF5 and natural naming checks have successfully passed.
def _g_check_name(self, name): """Check validity of name for this particular kind of node. This is invoked once the standard HDF5 and natural naming checks have successfully passed. """ if name.startswith('_i_'): # This is reserved for table index groups. raise ValueError( ...
(self, name)
[ 0.018462346866726875, 0.012906547635793686, 0.0015086130006238818, 0.04913035407662392, -0.04475409537553787, 0.015222888439893723, 0.0018237977055832744, 0.033386074006557465, 0.04653194919228554, -0.05559217557311058, 0.03280485421419144, 0.04154027998447418, 0.05836152657866478, -0.0048...
727,998
tables.node
_g_check_not_contains
null
def _g_check_not_contains(self, pathname): # The not-a-TARDIS test. ;) mypathname = self._v_pathname if (mypathname == '/' # all nodes fall below the root group or pathname == mypathname or pathname.startswith(mypathname + '/')): raise NodeError("can not move or recursively copy node ...
(self, pathname)
[ 0.008025404065847397, 0.03393755480647087, 0.02521231211721897, 0.048206958919763565, -0.05042462423443794, -0.001479201135225594, 0.023376375436782837, 0.02521231211721897, 0.01538732647895813, -0.024921471253037453, 0.007448265794664621, 0.0054759979248046875, 0.02353997342288494, -0.029...
727,999
tables.node
_g_check_open
Check that the node is open. If the node is closed, a `ClosedNodeError` is raised.
def _g_check_open(self): """Check that the node is open. If the node is closed, a `ClosedNodeError` is raised. """ if not self._v_isopen: raise ClosedNodeError("the node object is closed") assert self._v_file.isopen, "found an open node in a closed file"
(self)
[ 0.05271404981613159, -0.04745639115571976, 0.0049054306000471115, 0.0742257833480835, -0.010953457094728947, -0.018504900857806206, 0.0047808620147407055, 0.03546342998743057, -0.01040363684296608, -0.061786092817783356, 0.012723192572593689, -0.036700524389743805, 0.09505023807287216, -0....
728,000
tables.leaf
_g_copy
null
def _g_copy(self, newparent, newname, recursive, _log=True, **kwargs): # Compute default arguments. start = kwargs.pop('start', None) stop = kwargs.pop('stop', None) step = kwargs.pop('step', None) title = kwargs.pop('title', self._v_title) filters = kwargs.pop('filters', self.filters) chunk...
(self, newparent, newname, recursive, _log=True, **kwargs)
[ -0.007005269639194012, -0.03763524070382118, 0.005507140886038542, 0.009744838811457157, -0.08789023011922836, 0.015784025192260742, 0.014579921960830688, 0.010510237887501717, 0.030522627755999565, -0.021841879934072495, 0.012171714566648006, -0.025668876245617867, 0.0043660425581038, 0.0...
728,001
tables.node
_g_copy_as_child
Copy this node as a child of another group. Copies just this node into `newparent`, not recursing children nor overwriting nodes nor logging the copy. This is intended to be used when copying whole sub-trees.
def _g_copy_as_child(self, newparent, **kwargs): """Copy this node as a child of another group. Copies just this node into `newparent`, not recursing children nor overwriting nodes nor logging the copy. This is intended to be used when copying whole sub-trees. """ return self._g_copy(newparent,...
(self, newparent, **kwargs)
[ -0.0008793948218226433, 0.004140121396631002, 0.014366351068019867, 0.037961993366479874, -0.06638124585151672, 0.015080315060913563, 0.033364761620759964, 0.06255022436380386, 0.10357704013586044, -0.013121266849339008, -0.0021734547335654497, -0.02641667239367962, 0.02248116210103035, 0....
728,002
tables.array
_g_copy_with_stats
Private part of Leaf.copy() for each kind of leaf.
def _g_copy_with_stats(self, group, name, start, stop, step, title, filters, chunkshape, _log, **kwargs): """Private part of Leaf.copy() for each kind of leaf.""" # Compute the correct indices. (start, stop, step) = self._process_range_read(start, stop, step) # Get the slice of th...
(self, group, name, start, stop, step, title, filters, chunkshape, _log, **kwargs)
[ -0.005389019381254911, -0.011367881670594215, -0.02420143410563469, 0.01406686007976532, -0.01100146397948265, 0.004238378722220659, -0.008584002032876015, -0.005679472349584103, -0.04629373177886009, -0.03301332890987396, 0.017596980556845665, -0.020608754828572273, 0.015478908084332943, ...
728,003
tables.array
_g_create
Save a new array in file.
def _g_create(self): """Save a new array in file.""" self._v_version = obversion try: # `Leaf._g_post_init_hook()` should be setting the flavor on disk. self._flavor = flavor = flavor_of(self._obj) nparr = array_as_internal(self._obj, flavor) except Exception: # XXX # Pr...
(self)
[ 0.0261912252753973, -0.010637329891324043, -0.0426955372095108, 0.05344252660870552, 0.008288709446787834, -0.020890837535262108, -0.08217428624629974, 0.0332096703350544, -0.057390403002500534, -0.08670702576637268, 0.02211540937423706, -0.027360966429114342, -0.0009698338690213859, 0.007...
728,004
tables.node
_g_del_location
Clear location-dependent attributes. This also triggers the removal of file references to this node.
def _g_del_location(self): """Clear location-dependent attributes. This also triggers the removal of file references to this node. """ node_manager = self._v_file._node_manager pathname = self._v_pathname if not self._v__deleting: node_manager.drop_from_cache(pathname) # Note: no...
(self)
[ 0.06343506276607513, 0.006964883301407099, -0.0076263765804469585, 0.013161581009626389, -0.009773028083145618, -0.01893150806427002, -0.046978820115327835, 0.08378344774246216, -0.04264283925294876, -0.021970110014081, -0.03619007766246796, -0.006853923201560974, 0.024377090856432915, 0.0...
728,005
tables.leaf
_g_fix_byteorder_data
Fix the byteorder of data passed in constructors.
def _g_fix_byteorder_data(self, data, dbyteorder): """Fix the byteorder of data passed in constructors.""" dbyteorder = byteorders[dbyteorder] # If self.byteorder has not been passed as an argument of # the constructor, then set it to the same value of data. if self.byteorder is None: self.b...
(self, data, dbyteorder)
[ -0.02749454230070114, 0.010420466773211956, -0.022266706451773643, 0.022354718297719955, -0.017901375889778137, -0.06298045814037323, -0.01260313205420971, 0.05689011886715889, -0.013192804530262947, -0.07192234694957733, 0.006825230084359646, -0.022900383919477463, -0.018306225538253784, ...
728,006
tables.node
_g_getparent
The parent :class:`Group` instance
def _g_getparent(self): """The parent :class:`Group` instance""" (parentpath, nodename) = split_path(self._v_pathname) return self._v_file._get_node(parentpath)
(self)
[ 0.036595411598682404, 0.004859232809394598, -0.015765121206641197, 0.08321600407361984, -0.018981240689754486, -0.004272093530744314, 0.06495334953069687, 0.07105258852243423, 0.09457319974899292, 0.012338683009147644, -0.011769070290029049, -0.10494891554117203, 0.00008085485023912042, 0....
728,007
tables.node
_g_gettitle
A description of this node. A shorthand for TITLE attribute.
def _g_gettitle(self): """A description of this node. A shorthand for TITLE attribute.""" if hasattr(self._v_attrs, 'TITLE'): return self._v_attrs.TITLE else: return ''
(self)
[ 0.028859905898571014, -0.000010899020708166063, 0.03353553265333176, 0.00018320151139050722, 0.05069741606712341, -0.015262966975569725, 0.07466672360897064, 0.004064302425831556, 0.09759700298309326, -0.0005956498207524419, -0.02045810967683792, 0.011187468655407429, 0.04098787531256676, ...
728,008
tables.node
_g_log_create
null
def _g_log_create(self): self._v_file._log('CREATE', self._v_pathname)
(self)
[ -0.006144591141492128, 0.040323879569768906, -0.01448866631835699, 0.04507197067141533, 0.022221773862838745, -0.046573206782341, -0.03280024603009224, 0.07974003255367279, -0.041406165808439255, -0.010368997231125832, 0.025800298899412155, 0.040568266063928604, 0.05861800163984299, -0.026...
728,009
tables.node
_g_log_move
null
def _g_log_move(self, oldpathname): self._v_file._log('MOVE', oldpathname, self._v_pathname)
(self, oldpathname)
[ -0.016029419377446175, 0.04516204819083214, -0.057695552706718445, 0.04975421354174614, 0.006681082770228386, -0.056521616876125336, 0.006806245073676109, 0.09584850817918777, -0.02549860253930092, -0.005123026669025421, -0.0042727855034172535, -0.05099720507860184, 0.050272125750780106, 0...
728,010
tables.node
_g_maybe_remove
null
def _g_maybe_remove(self, parent, name, overwrite): if name in parent: if not overwrite: raise NodeError( f"destination group ``{parent._v_pathname}`` already " f"has a node named ``{name}``; you may want to use the " f"``overwrite`` argument") ...
(self, parent, name, overwrite)
[ -0.005415705498307943, -0.010273975320160389, -0.03094198927283287, 0.07533104717731476, -0.026345284655690193, 0.0015093652764335275, 0.002645677188411355, 0.1016763374209404, 0.08761179447174072, 0.014939285814762115, 0.038008563220500946, -0.03711666539311409, 0.03701375424861908, -0.03...
728,011
tables.node
_g_move
Move this node in the hierarchy. Moves the node into the given `newparent`, with the given `newname`. It does not log the change.
def _g_move(self, newparent, newname): """Move this node in the hierarchy. Moves the node into the given `newparent`, with the given `newname`. It does not log the change. """ oldparent = self._v_parent oldname = self._v_name oldpathname = self._v_pathname # to move the HDF5 node # ...
(self, newparent, newname)
[ -0.00726351561024785, -0.006398915778845549, -0.056773919612169266, 0.022242596372961998, -0.04209766909480095, -0.016888221725821495, -0.013385935686528683, 0.10659593343734741, -0.006254084408283234, -0.043221209198236465, -0.016932111233472824, -0.046802494674921036, 0.057335689663887024,...
728,012
tables.array
_g_open
Get the metadata info for an array in file.
def _g_open(self): """Get the metadata info for an array in file.""" (oid, self.atom, self.shape, self._v_chunkshape) = self._open_array() self.nrowsinbuf = self._calc_nrowsinbuf() return oid
(self)
[ 0.037951450794935226, -0.030480291694402695, -0.007356284651905298, 0.046801116317510605, 0.08774784207344055, 0.01621871441602707, -0.016048528254032135, 0.021715717390179634, -0.020388267934322357, -0.0571143813431263, -0.02154553309082985, -0.047243598848581314, -0.014440272003412247, -...
728,013
tables.leaf
_g_post_init_hook
Code to be run after node creation and before creation logging. This method gets or sets the flavor of the leaf.
def _g_post_init_hook(self): """Code to be run after node creation and before creation logging. This method gets or sets the flavor of the leaf. """ super()._g_post_init_hook() if self._v_new: # set flavor of new node if self._flavor is None: self._flavor = internal_flavor ...
(self)
[ 0.035365886986255646, -0.019298510625958443, 0.0547703355550766, 0.04304644837975502, -0.008219081908464432, 0.008744361810386181, 0.02708500809967518, 0.044353026896715164, 0.004504604265093803, -0.022123543545603752, -0.007835053838789463, 0.03753763437271118, 0.0017270224634557962, -0.0...
728,014
tables.node
_g_pre_kill_hook
Code to be called before killing the node.
def _g_pre_kill_hook(self): """Code to be called before killing the node.""" pass
(self)
[ 0.04056018590927124, 0.04272519797086716, 0.011780721135437489, 0.04627717286348343, -0.032255325466394424, 0.012220488861203194, -0.0027548957150429487, 0.07665503025054932, 0.0336592011153698, -0.03690672293305397, -0.010419130325317383, -0.02711341716349125, 0.06217649579048157, -0.0216...
728,015
tables.node
_g_remove
Remove this node from the hierarchy. If the node has children, recursive removal must be stated by giving `recursive` a true value; otherwise, a `NodeError` will be raised. If `force` is set to true, the node will be removed no matter it has children or not (useful for deleting...
def _g_remove(self, recursive, force): """Remove this node from the hierarchy. If the node has children, recursive removal must be stated by giving `recursive` a true value; otherwise, a `NodeError` will be raised. If `force` is set to true, the node will be removed no matter it has children or ...
(self, recursive, force)
[ 0.04141269251704216, -0.006693181581795216, -0.007824053056538105, 0.02622920647263527, -0.03843209892511368, 0.008643715642392635, -0.0799499899148941, 0.0683782771229744, 0.0058691357262432575, -0.019338779151439667, 0.02705325186252594, 0.012737645767629147, 0.04372703284025192, -0.0180...
728,016
tables.node
_g_remove_and_log
null
def _g_remove_and_log(self, recursive, force): file_ = self._v_file oldpathname = self._v_pathname # Log *before* moving to use the right shadow name. file_._log('REMOVE', oldpathname) move_to_shadow(file_, oldpathname)
(self, recursive, force)
[ 0.021853581070899963, 0.030497422441840172, -0.013148745521903038, 0.06277240812778473, 0.01762750931084156, -0.03969893231987953, -0.06134338676929474, 0.06901130825281143, -0.0017917235381901264, -0.025408709421753883, 0.019396360963582993, 0.002239382127299905, 0.03166503831744194, -0.0...
728,017
tables.node
_g_set_location
Set location-dependent attributes. Sets the location-dependent attributes of this node to reflect that it is placed under the specified `parentnode`, with the specified `name`. This also triggers the insertion of file references to this node. If the maximum recommended tree de...
def _g_set_location(self, parentnode, name): """Set location-dependent attributes. Sets the location-dependent attributes of this node to reflect that it is placed under the specified `parentnode`, with the specified `name`. This also triggers the insertion of file references to this node. If t...
(self, parentnode, name)
[ 0.03641410917043686, -0.019407419487833977, -0.001972354482859373, 0.08701267838478088, -0.044862475246191025, -0.010299310088157654, -0.018949264660477638, 0.06322529911994934, -0.019755616784095764, -0.06780684739351273, -0.030714668333530426, -0.04618195816874504, 0.03021986223757267, 0...
728,018
tables.node
_g_settitle
null
def _g_settitle(self, title): self._v_attrs.TITLE = title
(self, title)
[ 0.008921212516725063, 0.04871818423271179, -0.012101137079298496, 0.023156819865107536, 0.0273037888109684, -0.006847727578133345, 0.050669699907302856, 0.03127651661634445, 0.0713697001338005, 0.04063333570957184, -0.00955719780176878, 0.008903788402676582, 0.046522729098796844, 0.0329492...
728,019
tables.node
_g_update_dependent
Update dependent objects after a location change. All dependent objects (but not nodes!) referencing this node must be updated here.
def _g_update_dependent(self): """Update dependent objects after a location change. All dependent objects (but not nodes!) referencing this node must be updated here. """ if '_v_attrs' in self.__dict__: self._v_attrs._g_update_node_location(self)
(self)
[ 0.029665373265743256, 0.009417444467544556, -0.05804462730884552, 0.08941918611526489, -0.024876268580555916, -0.004014894366264343, 0.003046073717996478, 0.04433729499578476, 0.024148594588041306, -0.02639930509030819, -0.012911967933177948, -0.055844683200120926, 0.06329064071178436, -0....
728,020
tables.node
_g_update_location
Update location-dependent attributes. Updates location data when an ancestor node has changed its location in the hierarchy to `newparentpath`. In fact, this method is expected to be called by an ancestor of this node. This also triggers the update of file references to this node. ...
def _g_update_location(self, newparentpath): """Update location-dependent attributes. Updates location data when an ancestor node has changed its location in the hierarchy to `newparentpath`. In fact, this method is expected to be called by an ancestor of this node. This also triggers the update of...
(self, newparentpath)
[ 0.03949054330587387, -0.008805446326732635, -0.027973981574177742, 0.06223302707076073, -0.05068013444542885, -0.019763436168432236, 0.012315817177295685, 0.0733862891793251, -0.014232217334210873, -0.04541230574250221, -0.015267618000507355, -0.08014363795518875, 0.038691285997629166, 0.0...
728,021
tables.array
_init_loop
Initialization for the __iter__ iterator.
def _init_loop(self): """Initialization for the __iter__ iterator.""" self._nrowsread = self._start self._startb = self._start self._row = -1 # Sentinel self._init = True # Sentinel self.nrow = SizeType(self._start - self._step) # row number
(self)
[ 0.04278342053294182, -0.00504738325253129, -0.040944796055555344, 0.018845921382308006, -0.03564106673002243, 0.05434555560350418, -0.0051711369305849075, 0.032476507127285004, -0.030072148889303207, -0.022116554901003838, 0.0076727294363081455, 0.04578886926174164, -0.00008218019502237439, ...
728,022
tables.array
_interpret_indexing
Internal routine used by __getitem__ and __setitem__
def _interpret_indexing(self, keys): """Internal routine used by __getitem__ and __setitem__""" maxlen = len(self.shape) shape = (maxlen,) startl = np.empty(shape=shape, dtype=SizeType) stopl = np.empty(shape=shape, dtype=SizeType) stepl = np.empty(shape=shape, dtype=SizeType) stop_None = np...
(self, keys)
[ 0.003552425419911742, -0.025333311408758163, -0.07183956354856491, 0.012852211482822895, -0.0075540924444794655, 0.0043190657161176205, -0.013994847424328327, 0.020215865224599838, -0.01356513798236847, -0.008535587228834629, -0.0034572058357298374, 0.022305814549326897, 0.027677178382873535...
728,023
tables.leaf
_point_selection
Perform a point-wise selection. `key` can be any of the following items: * A boolean array with the same shape than self. Those positions with True values will signal the coordinates to be returned. * A numpy array (or list or tuple) with the point coordinates. This has to...
def _point_selection(self, key): """Perform a point-wise selection. `key` can be any of the following items: * A boolean array with the same shape than self. Those positions with True values will signal the coordinates to be returned. * A numpy array (or list or tuple) with the point coordinates. ...
(self, key)
[ 0.01963723450899124, -0.07088562846183777, -0.0472826287150383, 0.0853692889213562, -0.032779812812805176, -0.02325814962387085, 0.0059103285893797874, 0.026974854990839958, 0.04050059989094734, -0.04187999665737152, -0.013841856271028519, 0.002291809068992734, 0.01829615607857704, -0.0016...
728,024
tables.leaf
_process_range
null
def _process_range(self, start, stop, step, dim=None, warn_negstep=True): if dim is None: nrows = self.nrows # self.shape[self.maindim] else: nrows = self.shape[dim] if warn_negstep and step and step < 0: raise ValueError("slice step cannot be negative") # if start is not None: ...
(self, start, stop, step, dim=None, warn_negstep=True)
[ -0.0031741124112159014, -0.0052541689947247505, -0.05345115065574646, -0.0014294760767370462, -0.03162406384944916, 0.047832295298576355, 0.047183968126773834, -0.00061231100698933, -0.04743609577417374, -0.05669279769062996, 0.041961316019296646, 0.008545340970158577, 0.025933172553777695, ...
728,025
tables.leaf
_process_range_read
null
def _process_range_read(self, start, stop, step, warn_negstep=True): nrows = self.nrows if start is not None and stop is None and step is None: # Protection against start greater than available records # nrows == 0 is a special case for empty objects if 0 < nrows <= start: ra...
(self, start, stop, step, warn_negstep=True)
[ -0.005751977674663067, 0.0017024400876834989, -0.032214708626270294, 0.014373134821653366, -0.03068932145833969, 0.0554950088262558, 0.04543472081422806, 0.009056981652975082, -0.029890308156609535, -0.09021570533514023, 0.024932803586125374, 0.026603464037179947, 0.017950529232621193, -0....
728,026
tables.array
_read
Read the array from disk without slice or flavor processing.
def _read(self, start, stop, step, out=None): """Read the array from disk without slice or flavor processing.""" nrowstoread = len(range(start, stop, step)) shape = list(self.shape) if shape: shape[self.maindim] = nrowstoread if out is None: arr = np.empty(dtype=self.atom.dtype, shap...
(self, start, stop, step, out=None)
[ -0.007340399548411369, 0.03128816559910774, -0.07861869037151337, 0.007868352346122265, 0.017820730805397034, 0.03867950662970543, -0.01342112198472023, 0.02428583987057209, -0.005237849894911051, -0.08387969434261322, 0.042236242443323135, 0.005951049737632275, -0.05701892822980881, -0.01...
728,027
tables.array
_read_coords
Read a set of points defined by `coords`.
def _read_coords(self, coords): """Read a set of points defined by `coords`.""" nparr = np.empty(dtype=self.atom.dtype, shape=len(coords)) if len(coords) > 0: self._g_read_coords(coords, nparr) # For zero-shaped arrays, return the scalar if nparr.shape == (): nparr = nparr[()] re...
(self, coords)
[ -0.0369073711335659, 0.012843126431107521, -0.03428379073739052, 0.03235156089067459, 0.027600757777690887, 0.050663430243730545, -0.007392110303044319, -0.009980235248804092, 0.04828802868723869, -0.0006747294683009386, 0.0332733578979969, -0.007680172100663185, -0.03050796501338482, 0.03...
728,028
tables.array
_read_selection
Read a `selection`. Reorder if necessary.
def _read_selection(self, selection, reorder, shape): """Read a `selection`. Reorder if necessary. """ # Create the container for the slice nparr = np.empty(dtype=self.atom.dtype, shape=shape) # Arrays that have non-zero dimensionality self._g_read_selection(selection, nparr) # For zero-...
(self, selection, reorder, shape)
[ -0.00176558131352067, -0.011911612004041672, -0.054417818784713745, -0.018021713942289352, 0.013586821034550667, 0.025639502331614494, 0.00036893156357109547, -0.03094726800918579, 0.0310001689940691, -0.04471924528479576, 0.028937017545104027, 0.022341987118124962, -0.044049158692359924, ...
728,029
tables.array
_read_slice
Read a slice based on `startl`, `stopl` and `stepl`.
def _read_slice(self, startl, stopl, stepl, shape): """Read a slice based on `startl`, `stopl` and `stepl`.""" nparr = np.empty(dtype=self.atom.dtype, shape=shape) # Protection against reading empty arrays if 0 not in shape: # Arrays that have non-zero dimensionality self._g_read_slice(s...
(self, startl, stopl, stepl, shape)
[ -0.01835186406970024, 0.011444955132901669, -0.07275397330522537, 0.002520885318517685, 0.01354153361171484, 0.06436766684055328, 0.018170341849327087, -0.033744920045137405, -0.0125613147392869, -0.0002300222695339471, 0.051515914499759674, 0.017417024821043015, -0.016264362260699272, -0....
728,030
tables.array
_write_coords
Write `nparr` values in points defined by `coords` coordinates.
def _write_coords(self, coords, nparr): """Write `nparr` values in points defined by `coords` coordinates.""" if len(coords) > 0: nparr = self._check_shape(nparr, (len(coords),)) self._g_write_coords(coords, nparr)
(self, coords, nparr)
[ -0.047857847064733505, 0.011548085138201714, -0.043677084147930145, 0.06305135041475296, 0.01418230589479208, 0.006959442049264908, -0.062065646052360535, 0.0191363412886858, -0.017249898985028267, 0.0043400912545621395, 0.025985315442085266, -0.007188873831182718, 0.0413997583091259, 0.00...
728,031
tables.array
_write_selection
Write `nparr` in `selection`. Reorder if necessary.
def _write_selection(self, selection, reorder, shape, nparr): """Write `nparr` in `selection`. Reorder if necessary. """ nparr = self._check_shape(nparr, tuple(shape)) # Check whether we should reorder the array if reorder is not None: idx, neworder = reorder k = [slice(None)] * ...
(self, selection, reorder, shape, nparr)
[ -0.0561351552605629, -0.001751047559082508, -0.06585802137851715, -0.00017388728156220168, -0.0033538807183504105, -0.0167609341442585, -0.04238085448741913, -0.016913382336497307, -0.015905525535345078, -0.04214371368288994, 0.02918553724884987, -0.013838992454111576, 0.007707150187343359, ...
728,032
tables.array
_write_slice
Write `nparr` in a slice based on `startl`, `stopl` and `stepl`.
def _write_slice(self, startl, stopl, stepl, shape, nparr): """Write `nparr` in a slice based on `startl`, `stopl` and `stepl`.""" nparr = self._check_shape(nparr, tuple(shape)) countl = ((stopl - startl - 1) // stepl) + 1 self._g_write_slice(startl, stepl, countl, nparr)
(self, startl, stopl, stepl, shape, nparr)
[ -0.07050130516290665, 0.021471785381436348, -0.1013413518667221, 0.02037768065929413, -0.016796201467514038, 0.03866972774267197, -0.02365999110043049, -0.010163197293877602, -0.07877546548843384, 0.004318717867136002, 0.04236232489347458, 0.017950138077139854, 0.04410605505108833, -0.0199...
728,033
tables.leaf
close
Close this node in the tree. This method is completely equivalent to :meth:`Leaf._f_close`.
def close(self, flush=True): """Close this node in the tree. This method is completely equivalent to :meth:`Leaf._f_close`. """ self._f_close(flush)
(self, flush=True)
[ 0.007793786004185677, -0.008391405455768108, 0.056349363178014755, 0.06495508551597595, -0.07425322383642197, -0.04724905639886856, -0.06281189620494843, 0.06182273477315903, 0.012999260798096657, -0.024036679416894913, -0.016362417489290237, -0.11797426640987396, 0.02807576395571232, 0.01...
728,034
tables.leaf
copy
Copy this node and return the new one. This method has the behavior described in :meth:`Node._f_copy`. Please note that there is no recursive flag since leaves do not have child nodes. .. warning:: Note that unknown parameters passed to this method will be igno...
def copy(self, newparent=None, newname=None, overwrite=False, createparents=False, **kwargs): """Copy this node and return the new one. This method has the behavior described in :meth:`Node._f_copy`. Please note that there is no recursive flag since leaves do not have child nodes. .. warnin...
(self, newparent=None, newname=None, overwrite=False, createparents=False, **kwargs)
[ -0.037016741931438446, 0.005366876255720854, 0.06763734668493271, -0.027808506041765213, -0.06980615109205246, 0.022239454090595245, 0.0077516441233456135, 0.026779241859912872, 0.07579793781042099, 0.008633870631456375, -0.006621291860938072, -0.024941271170973778, 0.019923608750104904, 0...
728,035
tables.leaf
del_attr
Delete a PyTables attribute from this node. This method has the behavior described in :meth:`Node_f_delAttr`.
def del_attr(self, name): """Delete a PyTables attribute from this node. This method has the behavior described in :meth:`Node_f_delAttr`. """ self._f_delattr(name)
(self, name)
[ 0.017556607723236084, 0.052923284471035004, 0.05751943215727806, 0.02174721099436283, -0.04454207420349121, -0.00999493058770895, -0.03758026286959648, 0.04609665274620056, -0.006767489016056061, 0.011760730296373367, -0.024957755580544472, -0.015672525390982628, 0.05035484954714775, 0.037...
728,036
tables.leaf
flush
Flush pending data to disk. Saves whatever remaining buffered data to disk. It also releases I/O buffers, so if you are filling many datasets in the same PyTables session, please call flush() extensively so as to help PyTables to keep memory requirements low.
def flush(self): """Flush pending data to disk. Saves whatever remaining buffered data to disk. It also releases I/O buffers, so if you are filling many datasets in the same PyTables session, please call flush() extensively so as to help PyTables to keep memory requirements low. """ self._g_...
(self)
[ -0.013546690344810486, -0.00027645763475447893, -0.07915149629116058, 0.03111225925385952, -0.023942986503243446, -0.015879683196544647, -0.10946338623762131, 0.03691919893026352, -0.027893749997019768, -0.05248384550213814, -0.04301563650369644, -0.11041701585054398, -0.02566293068230152, ...
728,037
tables.leaf
get_attr
Get a PyTables attribute from this node. This method has the behavior described in :meth:`Node._f_getattr`.
def get_attr(self, name): """Get a PyTables attribute from this node. This method has the behavior described in :meth:`Node._f_getattr`. """ return self._f_getattr(name)
(self, name)
[ 0.03452001512050629, 0.003376050852239132, 0.05428389087319374, 0.037825122475624084, 0.012043613009154797, 0.009239278733730316, 0.022351209074258804, 0.00005310942287906073, 0.005429224111139774, -0.014630944468080997, -0.005162144545465708, -0.011384260840713978, 0.048007525503635406, 0...
728,038
tables.array
get_enum
Get the enumerated type associated with this array. If this array is of an enumerated type, the corresponding Enum instance (see :ref:`EnumClassDescr`) is returned. If it is not of an enumerated type, a TypeError is raised.
def get_enum(self): """Get the enumerated type associated with this array. If this array is of an enumerated type, the corresponding Enum instance (see :ref:`EnumClassDescr`) is returned. If it is not of an enumerated type, a TypeError is raised. """ if self.atom.kind != 'enum': raise Ty...
(self)
[ 0.04281073436141014, -0.042171768844127655, -0.04856143146753311, -0.012504213489592075, 0.043520696461200714, -0.04007738083600998, 0.007507852744311094, -0.029623182490468025, -0.020979389548301697, -0.06155374273657799, 0.005728509742766619, -0.026517096906900406, 0.011164159514009953, ...
728,039
tables.leaf
isvisible
Is this node visible? This method has the behavior described in :meth:`Node._f_isvisible()`.
def isvisible(self): """Is this node visible? This method has the behavior described in :meth:`Node._f_isvisible()`. """ return self._f_isvisible()
(self)
[ 0.01879272423684597, -0.044576480984687805, 0.043122902512550354, 0.019606037065386772, 0.030455980449914932, 0.02818908728659153, 0.009690539911389351, -0.010140457190573215, -0.04803738743066788, 0.04194619134068489, -0.017062271013855934, -0.041288621723651886, 0.061881016939878464, 0.0...
728,040
tables.array
iterrows
Iterate over the rows of the array. This method returns an iterator yielding an object of the current flavor for each selected row in the array. The returned rows are taken from the *main dimension*. If a range is not supplied, *all the rows* in the array are iterated upon - y...
def iterrows(self, start=None, stop=None, step=None): """Iterate over the rows of the array. This method returns an iterator yielding an object of the current flavor for each selected row in the array. The returned rows are taken from the *main dimension*. If a range is not supplied, *all the rows*...
(self, start=None, stop=None, step=None)
[ 0.00594113115221262, -0.0492137111723423, -0.03720599785447121, -0.014839385636150837, -0.03163226693868637, 0.026865024119615555, -0.04387296736240387, 0.008674230426549911, -0.014445102773606777, -0.02089701034128666, 0.030126821249723434, -0.006877553649246693, -0.003407413372769952, 0....
728,041
tables.leaf
move
Move or rename this node. This method has the behavior described in :meth:`Node._f_move`
def move(self, newparent=None, newname=None, overwrite=False, createparents=False): """Move or rename this node. This method has the behavior described in :meth:`Node._f_move` """ self._f_move(newparent, newname, overwrite, createparents)
(self, newparent=None, newname=None, overwrite=False, createparents=False)
[ -0.04864269122481346, 0.013179919682443142, -0.007842052727937698, -0.018768206238746643, -0.050997503101825714, -0.03170210123062134, 0.0024163187481462955, 0.1131012886762619, 0.05532051622867584, 0.016905443742871284, -0.010104604996740818, -0.012793309055268764, 0.08175065368413925, 0....
728,042
tables.array
read
Get data in the array as an object of the current flavor. The start, stop and step parameters can be used to select only a *range of rows* in the array. Their meanings are the same as in the built-in range() Python function, except that negative values of step are not allowed yet. More...
def read(self, start=None, stop=None, step=None, out=None): """Get data in the array as an object of the current flavor. The start, stop and step parameters can be used to select only a *range of rows* in the array. Their meanings are the same as in the built-in range() Python function, except that neg...
(self, start=None, stop=None, step=None, out=None)
[ 0.005926018580794334, -0.00995719712227583, -0.05795980244874954, -0.00044845702359452844, 0.021400542929768562, 0.04529038444161415, -0.03815687075257301, 0.02431710995733738, -0.010793155990540981, -0.07750266045331955, 0.03798967972397804, -0.014842911623418331, -0.031041933223605156, -...
728,043
tables.leaf
remove
Remove this node from the hierarchy. This method has the behavior described in :meth:`Node._f_remove`. Please note that there is no recursive flag since leaves do not have child nodes.
def remove(self): """Remove this node from the hierarchy. This method has the behavior described in :meth:`Node._f_remove`. Please note that there is no recursive flag since leaves do not have child nodes. """ self._f_remove(False)
(self)
[ 0.0072090597823262215, 0.045217715203762054, 0.054039839655160904, 0.0051592132076621056, -0.02762535959482193, -0.01288722176104784, -0.05175646394491196, 0.05988665670156479, 0.0246154572814703, 0.005401389207690954, -0.010698988102376461, 0.004121316131204367, 0.040339596569538116, 0.00...
728,044
tables.leaf
rename
Rename this node in place. This method has the behavior described in :meth:`Node._f_rename()`.
def rename(self, newname): """Rename this node in place. This method has the behavior described in :meth:`Node._f_rename()`. """ self._f_rename(newname)
(self, newname)
[ 0.003482471453025937, -0.01062957476824522, 0.02803121693432331, 0.019733291119337082, -0.07790449261665344, -0.017658809199929237, -0.014152764342725277, 0.08380219340324402, 0.08585952967405319, 0.004112530965358019, -0.011135336942970753, -0.0323001928627491, 0.08270494639873505, 0.0620...
728,045
tables.leaf
set_attr
Set a PyTables attribute for this node. This method has the behavior described in :meth:`Node._f_setattr()`.
def set_attr(self, name, value): """Set a PyTables attribute for this node. This method has the behavior described in :meth:`Node._f_setattr()`. """ self._f_setattr(name, value)
(self, name, value)
[ 0.02209307812154293, 0.030367575585842133, 0.045518066734075546, 0.03121666982769966, -0.036694154143333435, 0.021094143390655518, -0.017181655392050743, 0.03582841157913208, -0.024740250781178474, 0.0055981893092393875, -0.017597876489162445, -0.009414947591722012, 0.07731744647026062, 0....
728,046
tables.leaf
truncate
Truncate the main dimension to be size rows. If the main dimension previously was larger than this size, the extra data is lost. If the main dimension previously was shorter, it is extended, and the extended part is filled with the default values. The truncation operation can only be ...
def truncate(self, size): """Truncate the main dimension to be size rows. If the main dimension previously was larger than this size, the extra data is lost. If the main dimension previously was shorter, it is extended, and the extended part is filled with the default values. The truncation operati...
(self, size)
[ -0.0352281890809536, 0.04729962348937988, -0.0019446061924099922, 0.028342369943857193, 0.010745277628302574, -0.004137867130339146, -0.032269835472106934, 0.0038934629410505295, 0.03601028025150299, -0.050121959298849106, -0.037030402570962906, -0.03492215275764465, 0.0068008084781467915, ...
728,047
tables.atom
Atom
Defines the type of atomic cells stored in a dataset. The meaning of *atomic* is that individual elements of a cell can not be extracted directly by indexing (i.e. __getitem__()) the dataset; e.g. if a dataset has shape (2, 2) and its atoms have shape (3,), to get the third element of the cell at (1, ...
class Atom(metaclass=MetaAtom): """Defines the type of atomic cells stored in a dataset. The meaning of *atomic* is that individual elements of a cell can not be extracted directly by indexing (i.e. __getitem__()) the dataset; e.g. if a dataset has shape (2, 2) and its atoms have shape (3,), to ge...
(nptype, shape, dflt)
[ 0.07005788385868073, 0.02355041541159153, -0.0033581338357180357, -0.013811061158776283, 0.06747981905937195, -0.02719244360923767, -0.02123834192752838, -0.012450415641069412, 0.012399263679981232, -0.0428449809551239, -0.012440185062587261, 0.029668204486370087, -0.0006854378152638674, 0...
728,048
tables.atom
dispatched_cmp
null
def _cmp_dispatcher(other_method_name): """Dispatch comparisons to a method of the *other* object. Returns a new *rich comparison* method which dispatches calls to the method `other_method_name` of the *other* object. If there is no such method in the object, ``False`` is returned. This is part o...
(self, other)
[ 0.012029554694890976, -0.030184483155608177, -0.014292540028691292, 0.009307165630161762, 0.005253359209746122, -0.06138986349105835, -0.015925973653793335, 0.0244334377348423, 0.02936776727437973, -0.02128567546606064, 0.03476149961352348, -0.017763584852218628, 0.05403941497206688, -0.00...
728,049
tables.atom
__init__
null
def __init__(self, nptype, shape, dflt): if not hasattr(self, 'type'): raise NotImplementedError("``%s`` is an abstract class; " "please use one of its subclasses" % self.__class__.__name__) self.shape = shape = _normalize_shape(shape) ...
(self, nptype, shape, dflt)
[ 0.035025034099817276, 0.02851049043238163, 0.04021046310663223, -0.007773461285978556, 0.024279780685901642, -0.021621547639369965, -0.031486961990594864, -0.017971156165003777, -0.026451295241713524, -0.013309887610375881, 0.007979380898177624, 0.04185781627893448, -0.03337767720222473, 0...
728,051
tables.atom
__repr__
null
def __repr__(self): args = f'shape={self.shape}, dflt={self.dflt!r}' if not hasattr(self.__class__.itemsize, '__int__'): # non-fixed args = f'itemsize={self.itemsize}, {args}' return f'{self.__class__.__name__}({args})'
(self)
[ 0.04496341571211815, -0.050911884754896164, 0.07229137420654297, -0.01657697930932045, 0.01798536628484726, -0.04636305570602417, 0.017897889018058777, -0.042828965932130814, 0.02431873418390751, -0.0204872228205204, 0.002751166233792901, -0.0024821730330586433, -0.031002013012766838, 0.01...
728,052
tables.atom
_get_init_args
Get a dictionary of instance constructor arguments. This implementation works on classes which use the same names for both constructor arguments and instance attributes.
def _get_init_args(self): """Get a dictionary of instance constructor arguments. This implementation works on classes which use the same names for both constructor arguments and instance attributes. """ signature = inspect.signature(self.__init__) parameters = signature.parameters args = [ar...
(self)
[ 0.014420554041862488, -0.008851680904626846, 0.05478620156645775, -0.03550590202212334, -0.03290742635726929, 0.01846703700721264, 0.055262260138988495, 0.01526357140392065, 0.07398716360330582, 0.0358232744038105, -0.026242630556225777, 0.03034862130880356, -0.028325378894805908, -0.00453...
728,053
tables.atom
_is_equal_to_atom
Is this object equal to the given `atom`?
def _is_equal_to_atom(self, atom): """Is this object equal to the given `atom`?""" return (self.type == atom.type and self.shape == atom.shape and self.itemsize == atom.itemsize and np.all(self.dflt == atom.dflt))
(self, atom)
[ 0.09950572997331619, -0.02054622210562229, 0.019708693027496338, 0.013810340315103531, 0.010611687786877155, -0.03759976476430893, -0.03364377096295357, -0.004887078423053026, -0.00001136359878728399, -0.006544319447129965, 0.003759976476430893, -0.039274826645851135, 0.04251802712678909, ...
728,054
tables.atom
copy
Get a copy of the atom, possibly overriding some arguments. Constructor arguments to be overridden must be passed as keyword arguments:: >>> atom1 = Int32Atom(shape=12) >>> atom2 = atom1.copy() >>> print(atom1) Int32Atom(shape=(12,), dflt=0) ...
def copy(self, **override): """Get a copy of the atom, possibly overriding some arguments. Constructor arguments to be overridden must be passed as keyword arguments:: >>> atom1 = Int32Atom(shape=12) >>> atom2 = atom1.copy() >>> print(atom1) Int32Atom(shape=(12,), dflt=0) ...
(self, **override)
[ 0.000033961001463467255, -0.012032673694193363, 0.05585012957453728, -0.003801823128014803, -0.06121513992547989, -0.014666931703686714, -0.004918728955090046, 0.009596225805580616, 0.07005389779806137, -0.014338855631649494, -0.019163504242897034, 0.0034327374305576086, -0.07568908482789993...
728,055
tables.atom
BoolAtom
Defines an atom of type bool.
class BoolAtom(Atom): """Defines an atom of type bool.""" kind = 'bool' itemsize = 1 type = 'bool' _deftype = 'bool8' _defvalue = False def __init__(self, shape=(), dflt=_defvalue): Atom.__init__(self, self.type, shape, dflt)
(shape=(), dflt=False)
[ 0.04882264509797096, -0.002419603755697608, 0.012598788365721703, -0.04391791671514511, 0.023306822404265404, -0.0011787964031100273, -0.0547008290886879, -0.00023897683422546834, -0.05462595075368881, -0.054214101284742355, 0.021884076297283173, 0.04811127111315727, -0.027518898248672485, ...
728,057
tables.atom
__init__
null
def __init__(self, shape=(), dflt=_defvalue): Atom.__init__(self, self.type, shape, dflt)
(self, shape=(), dflt=False)
[ 0.04613760486245155, 0.014950055629014969, 0.05430014058947563, -0.025521066039800644, 0.0018961259629577398, -0.0033674845471978188, -0.02511819452047348, -0.020669085904955864, -0.004284894093871117, -0.002774124266579747, 0.01657905988395214, 0.05801356956362724, -0.03804513067007065, 0...
728,063
tables.description
BoolCol
Defines a non-nested column of a particular type. The constructor accepts the same arguments as the equivalent `Atom` class, plus an additional ``pos`` argument for position information, which is assigned to the `_v_pos` attribute and an ``attrs`` argument for storing ad...
from tables.description import BoolCol
(*args, **kwargs)
[ 0.015143235214054585, -0.027539359405636787, 0.04224749282002449, -0.02774411253631115, 0.015416240319609642, -0.013189544901251793, -0.007008545100688934, 0.021157871931791306, -0.05228041857481003, -0.04726395756006241, -0.021840384230017662, 0.04944799467921257, -0.005899463314563036, 0...
728,064
tables.description
dispatched_cmp
null
def same_position(oldmethod): """Decorate `oldmethod` to also compare the `_v_pos` attribute.""" def newmethod(self, other): try: other._v_pos except AttributeError: return False # not a column definition return self._v_pos == other._v_pos and oldmethod(self, oth...
(self, other)
[ 0.04649626836180687, -0.05082887411117554, 0.03533012047410011, 0.0474473275244236, -0.03716178983449936, -0.04892675578594208, 0.008801707997918129, 0.04646104574203491, 0.04195231571793556, -0.01748013123869896, -0.024727560579776764, -0.0758030042052269, 0.05773286521434784, 0.028584638...
728,065
tables.description
__init__
null
@classmethod def _subclass_from_prefix(cls, prefix): """Get a column subclass for the given `prefix`.""" cname = '%sCol' % prefix class_from_prefix = cls._class_from_prefix if cname in class_from_prefix: return class_from_prefix[cname] atombase = getattr(atom, '%sAtom' % prefix) class Ne...
(self, *args, **kwargs)
[ 0.03903808444738388, -0.011895314790308475, -0.009385996498167515, 0.008734723553061485, -0.017153387889266014, -0.013762935996055603, -0.009362053126096725, 0.0440567210316658, -0.002952279057353735, -0.07340233027935028, 0.00042320790817029774, 0.05014804005622864, 0.02172187902033329, 0...
728,067
tables.description
__repr__
null
def __repr__(self): # Reuse the atom representation. atomrepr = super().__repr__() lpar = atomrepr.index('(') rpar = atomrepr.rindex(')') atomargs = atomrepr[lpar + 1:rpar] classname = self.__class__.__name__ if self._v_col_attrs: return (f'{classname}({atomargs}, pos={self._v_pos}' ...
(self)
[ 0.056641317903995514, -0.05593285709619522, 0.08388157933950424, 0.022086217999458313, 0.04675831273198128, -0.07180234789848328, 0.02150173857808113, -0.02709856629371643, 0.022546716034412384, -0.008869023993611336, -0.008461660705506802, 0.011326492764055729, -0.012672564946115017, 0.05...
728,068
tables.description
_get_init_args
Get a dictionary of instance constructor arguments.
def _get_init_args(self): """Get a dictionary of instance constructor arguments.""" kwargs = {arg: getattr(self, arg) for arg in ('shape', 'dflt')} kwargs['pos'] = getattr(self, '_v_pos', None) return kwargs
(self)
[ 0.02186589129269123, -0.03493389114737511, 0.049768827855587006, -0.028712786734104156, -0.017503757029771805, 0.033921580761671066, 0.029780313372612, 0.028418296948075294, 0.053744446486234665, 0.027884533628821373, -0.005664333235472441, 0.04167035222053528, -0.035633303225040436, 0.009...
728,069
tables.description
_is_equal_to_atom
Is this object equal to the given `atom`?
def same_position(oldmethod): """Decorate `oldmethod` to also compare the `_v_pos` attribute.""" def newmethod(self, other): try: other._v_pos except AttributeError: return False # not a column definition return self._v_pos == other._v_pos and oldmethod(self, oth...
(self, other)
[ 0.04649626836180687, -0.05082887411117554, 0.03533012047410011, 0.0474473275244236, -0.03716178983449936, -0.04892675578594208, 0.008801707997918129, 0.04646104574203491, 0.04195231571793556, -0.01748013123869896, -0.024727560579776764, -0.0758030042052269, 0.05773286521434784, 0.028584638...
728,071
tables.carray
CArray
This class represents homogeneous datasets in an HDF5 file. The difference between a CArray and a normal Array (see :ref:`ArrayClassDescr`), from which it inherits, is that a CArray has a chunked layout and, as a consequence, it supports compression. You can use datasets of this class to easily save or...
class CArray(Array): """This class represents homogeneous datasets in an HDF5 file. The difference between a CArray and a normal Array (see :ref:`ArrayClassDescr`), from which it inherits, is that a CArray has a chunked layout and, as a consequence, it supports compression. You can use datasets of ...
(parentnode, name, atom=None, shape=None, title='', filters=None, chunkshape=None, byteorder=None, _log=True, track_times=True)
[ 0.001991872675716877, -0.011595499701797962, -0.054576557129621506, 0.04529208317399025, 0.01759004034101963, -0.009607411921024323, -0.07750517129898071, 0.01816527359187603, -0.02712680958211422, -0.07625378668308258, 0.0001389201934216544, -0.046583835035562515, 0.01861940696835518, 0.0...
728,074
tables.carray
__init__
null
def __init__(self, parentnode, name, atom=None, shape=None, title="", filters=None, chunkshape=None, byteorder=None, _log=True, track_times=True): self.atom = atom """An `Atom` instance representing the shape, type of the atomic objects to be saved. ""...
(self, parentnode, name, atom=None, shape=None, title='', filters=None, chunkshape=None, byteorder=None, _log=True, track_times=True)
[ 0.019695166498422623, 0.011815198697149754, -0.035093896090984344, 0.02906748093664646, -0.00048328962293453515, -0.0022741644643247128, -0.09071943908929825, 0.02330721542239189, -0.013839846476912498, -0.04798320680856705, 0.017033657059073448, -0.029105501249432564, -0.010265820659697056,...
728,100
tables.carray
_g_copy_with_stats
Private part of Leaf.copy() for each kind of leaf.
def _g_copy_with_stats(self, group, name, start, stop, step, title, filters, chunkshape, _log, **kwargs): """Private part of Leaf.copy() for each kind of leaf.""" (start, stop, step) = self._process_range_read(start, stop, step) maindim = self.maindim shape = list(self.shape) ...
(self, group, name, start, stop, step, title, filters, chunkshape, _log, **kwargs)
[ -0.010021884925663471, -0.002479495480656624, -0.03434455394744873, 0.02584342658519745, -0.015925444662570953, -0.008921461179852486, -0.02300971746444702, 0.0033484995365142822, -0.027203606441617012, -0.054596129804849625, 0.0001097324347938411, -0.019316449761390686, 0.009011195041239262...
728,101
tables.carray
_g_create
Create a new array in file (specific part).
def _g_create(self): """Create a new array in file (specific part).""" if min(self.shape) < 1: raise ValueError( "shape parameter cannot have zero-dimensions.") # Finish the common part of creation process return self._g_create_common(self.nrows)
(self)
[ -0.016394739970564842, 0.004398220684379339, -0.03792684152722359, 0.02708321437239647, -0.000634628115221858, 0.010679854080080986, -0.0785430446267128, 0.022376837208867073, -0.03375488892197609, -0.04578804224729538, 0.060958780348300934, 0.018997900187969208, 0.019308211281895638, -0.0...
728,102
tables.carray
_g_create_common
Create a new array in file (common part).
def _g_create_common(self, expectedrows): """Create a new array in file (common part).""" self._v_version = obversion if self._v_chunkshape is None: # Compute the optimal chunk size self._v_chunkshape = self._calc_chunkshape( expectedrows, self.rowsize, self.atom.size) # Comp...
(self, expectedrows)
[ -0.018126191571354866, -0.008499405346810818, -0.06574047356843948, 0.045553289353847504, -0.015069929882884026, -0.021473107859492302, -0.05577018857002258, 0.043298523873090744, -0.006160967517644167, -0.051718659698963165, 0.05608726665377617, 0.012489281594753265, 0.0027501960285007954, ...
728,146
tables.exceptions
ClosedFileError
The operation can not be completed because the hosting file is closed. For instance, getting an existing node from a closed file is not allowed.
class ClosedFileError(ValueError): """The operation can not be completed because the hosting file is closed. For instance, getting an existing node from a closed file is not allowed. """ pass
null
[ 0.006571045145392418, -0.03383690491318703, -0.02830059826374054, 0.07050386816263199, -0.003871433436870575, -0.06151842698454857, -0.008012606762349606, 0.04899541288614273, -0.006716970354318619, -0.08334526419639587, 0.07007935643196106, -0.03958546370267868, 0.04772188514471054, -0.02...
728,147
tables.exceptions
ClosedNodeError
The operation can not be completed because the node is closed. For instance, listing the children of a closed group is not allowed.
class ClosedNodeError(ValueError): """The operation can not be completed because the node is closed. For instance, listing the children of a closed group is not allowed. """ pass
null
[ 0.001699193031527102, -0.015411789529025555, 0.009212439879775047, 0.04588903486728668, -0.028814850375056267, -0.025576643645763397, -0.018580729141831398, 0.044642239809036255, 0.016390178352594376, -0.08152662962675095, 0.059569161385297775, -0.018979012966156006, 0.06618411093950272, -...
728,148
tables.description
Col
Defines a non-nested column. Col instances are used as a means to declare the different properties of a non-nested column in a table or nested column. Col classes are descendants of their equivalent Atom classes (see :ref:`AtomClassDescr`), but their instances have an additional _v_pos attribute that ...
class Col(atom.Atom, metaclass=type): """Defines a non-nested column. Col instances are used as a means to declare the different properties of a non-nested column in a table or nested column. Col classes are descendants of their equivalent Atom classes (see :ref:`AtomClassDescr`), but their instan...
(nptype, shape, dflt)
[ 0.0511850044131279, -0.014031410217285156, 0.0064030662178993225, 0.028122108429670334, 0.014140104874968529, -0.02837902121245861, 0.010790351778268814, 0.012084798887372017, -0.036422379314899445, -0.05288458243012428, -0.01382390409708023, 0.028181396424770355, 0.024288173764944077, 0.0...
728,156
tables.table
Cols
Container for columns in a table or nested column. This class is used as an *accessor* to the columns in a table or nested column. It supports the *natural naming* convention, so that you can access the different columns as attributes which lead to Column instances (for non-nested columns) or other Co...
class Cols: """Container for columns in a table or nested column. This class is used as an *accessor* to the columns in a table or nested column. It supports the *natural naming* convention, so that you can access the different columns as attributes which lead to Column instances (for non-nested c...
(table, desc)
[ 0.05780749395489693, -0.02315259911119938, -0.03148330748081207, 0.049941953271627426, 0.004860459826886654, -0.03888367861509323, 0.01095255371183157, 0.019748426973819733, 0.0029812934808433056, -0.07062071561813354, -0.03605039417743683, 0.029072897508740425, 0.030468396842479706, 0.032...
728,157
tables.table
__getitem__
Get a row or a range of rows from a table or nested column. If key argument is an integer, the corresponding nested type row is returned as a record of the current flavor. If key is a slice, the range of rows determined by it is returned as a structured array of the current flavor. ...
def __getitem__(self, key): """Get a row or a range of rows from a table or nested column. If key argument is an integer, the corresponding nested type row is returned as a record of the current flavor. If key is a slice, the range of rows determined by it is returned as a structured array of the cu...
(self, key)
[ 0.04720288887619972, -0.016368446871638298, -0.06018000841140747, 0.01796761155128479, 0.015283957123756409, -0.00518349464982748, 0.010321036912500858, 0.012058058753609657, 0.021211890503764153, -0.08609747886657715, -0.013556125573813915, 0.04797489941120148, -0.014806046150624752, -0.0...
728,158
tables.table
__init__
null
def __init__(self, table, desc): myDict = self.__dict__ myDict['_v__tableFile'] = table._v_file myDict['_v__tablePath'] = table._v_pathname myDict['_v_desc'] = desc myDict['_v_colnames'] = desc._v_names myDict['_v_colpathnames'] = table.description._v_pathnames # Put the column in the local ...
(self, table, desc)
[ 0.046927500516176224, -0.007681916933506727, 0.006274648942053318, 0.0012807064922526479, 0.004045314155519009, -0.039459228515625, 0.03934776410460472, 0.05149763822555542, -0.04094545170664787, -0.019060814753174782, -0.052389372140169144, 0.09459811449050903, -0.05201781541109085, 0.028...
728,159
tables.table
__len__
Get the number of top level columns in table.
def __len__(self): """Get the number of top level columns in table.""" return len(self._v_colnames)
(self)
[ -0.009348899126052856, -0.03276726230978966, 0.003263730090111494, 0.02144796773791313, 0.020894581452012062, 0.017775485292077065, 0.02493598870933056, -0.009474669583141804, 0.007361734285950661, -0.035014353692531586, -0.034511271864175797, -0.018194718286395073, -0.0069508859887719154, ...
728,160
tables.table
__repr__
A detailed string representation for this object.
def __repr__(self): """A detailed string representation for this object.""" lines = [f'{self!s}'] for name in self._v_colnames: # Get this class name classname = getattr(self, name).__class__.__name__ # The type if name in self._v_desc._v_dtypes: tcol = self._v_de...
(self)
[ 0.05539965629577637, -0.05366380140185356, 0.03264886513352394, -0.006347877439111471, 0.03985081985592842, -0.07622992992401123, 0.03386765718460083, -0.030617542564868927, 0.01926061324775219, -0.018946683034300804, -0.05011822283267975, 0.029712682589888573, -0.0250406451523304, 0.02655...
728,161
tables.table
__setitem__
Set a row or a range of rows in a table or nested column. If key argument is an integer, the corresponding row is set to value. If key is a slice, the range of rows determined by it is set to value. Examples -------- :: table.cols[4] = record t...
def __setitem__(self, key, value): """Set a row or a range of rows in a table or nested column. If key argument is an integer, the corresponding row is set to value. If key is a slice, the range of rows determined by it is set to value. Examples -------- :: table.cols[4] = record ...
(self, key, value)
[ 0.03964317962527275, -0.012768621556460857, -0.049902044236660004, 0.026728004217147827, -0.026489851996302605, -0.018017129972577095, -0.039972931146621704, 0.036162495613098145, -0.02907288819551468, -0.06455756723880768, -0.025097576901316643, 0.0035539634991437197, 0.03975309804081917, ...
728,162
tables.table
__str__
The string representation for this object.
def __str__(self): """The string representation for this object.""" # The pathname descpathname = self._v_desc._v_pathname if descpathname: descpathname = "." + descpathname return (f"{self._v__tablePath}.cols{descpathname} " f"({self.__class__.__name__}), " f"{len(se...
(self)
[ 0.024359239265322685, -0.051444731652736664, 0.019490933045744896, -0.001979409484192729, 0.03834455832839012, -0.057605355978012085, 0.047797925770282745, 0.007935341447591782, -0.011772452853620052, -0.04871847853064537, -0.03388341888785362, 0.024164507165551186, -0.023332469165325165, ...
728,163
tables.table
_f_col
Get an accessor to the column colname. This method returns a Column instance (see :ref:`ColumnClassDescr`) if the requested column is not nested, and a Cols instance (see :ref:`ColsClassDescr`) if it is. You may use full column pathnames in colname. Calling cols._f_col('col1/c...
def _f_col(self, colname): """Get an accessor to the column colname. This method returns a Column instance (see :ref:`ColumnClassDescr`) if the requested column is not nested, and a Cols instance (see :ref:`ColsClassDescr`) if it is. You may use full column pathnames in colname. Calling cols._f...
(self, colname)
[ 0.04907803237438202, -0.025978146120905876, 0.02983427792787552, 0.09180913120508194, 0.03173466771841049, -0.044391632080078125, 0.054354842752218246, 0.044465433806180954, -0.018302785232663155, -0.035498544573783875, -0.016596123576164246, 0.03728823363780975, 0.02878260612487793, 0.019...
728,164
tables.table
_g_close
null
def _g_close(self): # First, close the columns (ie possible indices open) for col in self._v_colnames: colobj = self._g_col(col) if isinstance(colobj, Column): colobj.close() # Delete the reference to column del self.__dict__[col] else: col...
(self)
[ 0.030280765146017075, -0.02843330428004265, 0.0020454032346606255, 0.040890470147132874, -0.05222156643867493, -0.06752909719944, -0.019389543682336807, 0.07178705930709839, 0.0043283370323479176, -0.06323595345020294, -0.03279683366417885, -0.04951195418834686, 0.022996490821242332, 0.025...