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
728,918
tables.table
modify_column
Modify one single column in the row slice [start:stop:step]. The colname argument specifies the name of the column in the table to be modified with the data given in column. This method returns the number of rows modified. Should the modification exceed the length of the table, an Ind...
def modify_column(self, start=None, stop=None, step=None, column=None, colname=None): """Modify one single column in the row slice [start:stop:step]. The colname argument specifies the name of the column in the table to be modified with the data given in column. This method returns th...
(self, start=None, stop=None, step=None, column=None, colname=None)
[ 0.05624082684516907, 0.03857492282986641, -0.03365989401936531, 0.057852309197187424, -0.019841408357024193, -0.014503364451229572, -0.02493773028254509, 0.0696161538362503, -0.06200188398361206, -0.07719013094902039, 0.002113815164193511, 0.015047241002321243, 0.0040664817206561565, 0.021...
728,919
tables.table
modify_columns
Modify a series of columns in the row slice [start:stop:step]. The names argument specifies the names of the columns in the table to be modified with the data given in columns. This method returns the number of rows modified. Should the modification exceed the length of the table, an ...
def modify_columns(self, start=None, stop=None, step=None, columns=None, names=None): """Modify a series of columns in the row slice [start:stop:step]. The names argument specifies the names of the columns in the table to be modified with the data given in columns. This method return...
(self, start=None, stop=None, step=None, columns=None, names=None)
[ 0.034910012036561966, 0.019819023087620735, -0.049359045922756195, 0.006592754740267992, -0.04581302031874657, -0.013664426282048225, -0.0255354605615139, 0.062401898205280304, -0.059344980865716934, -0.05901890993118286, -0.016823241487145424, 0.027940236032009125, 0.013807082548737526, 0...
728,920
tables.table
modify_coordinates
Modify a series of rows in positions specified in coords. The values in the selected rows will be modified with the data given in rows. This method returns the number of rows modified. The possible values for the rows argument are the same as in :meth:`Table.append`.
def modify_coordinates(self, coords, rows): """Modify a series of rows in positions specified in coords. The values in the selected rows will be modified with the data given in rows. This method returns the number of rows modified. The possible values for the rows argument are the same as in :meth:...
(self, coords, rows)
[ -0.002302634296938777, -0.034238215535879135, -0.02123613841831684, 0.03796817362308502, -0.03881269320845604, -0.005256252363324165, -0.030244342982769012, 0.061438772827386856, -0.05605496093630791, -0.028696058318018913, 0.012280716560781002, 0.008185678161680698, -0.00006986114749452099,...
728,921
tables.table
modify_rows
Modify a series of rows in the slice [start:stop:step]. The values in the selected rows will be modified with the data given in rows. This method returns the number of rows modified. Should the modification exceed the length of the table, an IndexError is raised before changing data. ...
def modify_rows(self, start=None, stop=None, step=None, rows=None): """Modify a series of rows in the slice [start:stop:step]. The values in the selected rows will be modified with the data given in rows. This method returns the number of rows modified. Should the modification exceed the length of the...
(self, start=None, stop=None, step=None, rows=None)
[ 0.003230069298297167, -0.009113813750445843, -0.034014053642749786, -0.00623862212523818, -0.05565936118364334, 0.02007208950817585, -0.030542124062776566, 0.039348527789115906, -0.0810840055346489, -0.06079491972923279, 0.01430362369865179, 0.02477365918457508, 0.006080396473407745, 0.030...
728,923
tables.table
read
Get data in the table as a (record) array. The start, stop and step parameters can be used to select only a *range of rows* in the table. Their meanings are the same as in the built-in Python slices. If field is supplied only the named column will be selected. If the column is ...
def read(self, start=None, stop=None, step=None, field=None, out=None): """Get data in the table as a (record) array. The start, stop and step parameters can be used to select only a *range of rows* in the table. Their meanings are the same as in the built-in Python slices. If field is supplied only...
(self, start=None, stop=None, step=None, field=None, out=None)
[ 0.02100447006523609, 0.0374932587146759, -0.041034601628780365, 0.013406510464847088, -0.016170255839824677, 0.025426462292671204, -0.021753959357738495, 0.03994784131646156, -0.04792991280555725, -0.10432907193899155, 0.010633395984768867, 0.028705483302474022, -0.034120552241802216, 0.01...
728,924
tables.table
read_coordinates
Get a set of rows given their indexes as a (record) array. This method works much like the :meth:`Table.read` method, but it uses a sequence (coords) of row indexes to select the wanted columns, instead of a column range. The selected rows are returned in an array or structured array o...
def read_coordinates(self, coords, field=None): """Get a set of rows given their indexes as a (record) array. This method works much like the :meth:`Table.read` method, but it uses a sequence (coords) of row indexes to select the wanted columns, instead of a column range. The selected rows are retur...
(self, coords, field=None)
[ 0.0028571770526468754, -0.02886623702943325, -0.04250557720661163, 0.05110911652445793, 0.0008401893428526819, 0.011804260313510895, -0.006307554431259632, 0.041242361068725586, 0.01013134978711605, -0.05817630887031555, 0.017079047858715057, 0.041583769023418427, -0.05377211794257164, 0.0...
728,925
tables.table
read_sorted
Read table data following the order of the index of sortby column. The sortby column must have associated a full index. If you want to ensure a fully sorted order, the index must be a CSI one. You may want to use the checkCSI argument in order to explicitly check for the existence of ...
def read_sorted(self, sortby, checkCSI=False, field=None, start=None, stop=None, step=None): """Read table data following the order of the index of sortby column. The sortby column must have associated a full index. If you want to ensure a fully sorted order, the index must be a CSI one. Y...
(self, sortby, checkCSI=False, field=None, start=None, stop=None, step=None)
[ 0.00647171912714839, 0.03457481786608696, -0.06239038333296776, 0.03346007317304611, 0.04197106882929802, 0.029124949127435684, 0.005582576617598534, 0.059488505125045776, -0.02018928714096546, -0.09519576281309128, -0.009147994220256805, -0.0067459819838404655, -0.01618150994181633, -0.02...
728,926
tables.table
read_where
Read table data fulfilling the given *condition*. This method is similar to :meth:`Table.read`, having their common arguments and return values the same meanings. However, only the rows fulfilling the *condition* are included in the result. The meaning of the other arguments is the sam...
def read_where(self, condition, condvars=None, field=None, start=None, stop=None, step=None): """Read table data fulfilling the given *condition*. This method is similar to :meth:`Table.read`, having their common arguments and return values the same meanings. However, only the rows fulfil...
(self, condition, condvars=None, field=None, start=None, stop=None, step=None)
[ 0.05245428904891014, 0.0005168739007785916, -0.010924986563622952, 0.0028321549762040377, 0.009126580320298672, 0.01890794187784195, -0.009866572916507721, 0.015490518882870674, -0.050409216433763504, -0.0788608267903328, -0.0071398108266294, -0.0002257819432998076, -0.016019726172089577, ...
728,927
tables.table
reindex
Recompute all the existing indexes in the table. This can be useful when you suspect that, for any reason, the index information for columns is no longer valid and want to rebuild the indexes on it.
def reindex(self): """Recompute all the existing indexes in the table. This can be useful when you suspect that, for any reason, the index information for columns is no longer valid and want to rebuild the indexes on it. """ self._do_reindex(dirty=False)
(self)
[ 0.014140061102807522, 0.01508790161460638, 0.024402590468525887, 0.004618569277226925, -0.0036901163402944803, -0.020369959995150566, -0.03529414162039757, -0.04191179573535919, -0.012089277617633343, -0.05707724764943123, -0.03646601736545563, -0.006281599402427673, 0.05083873122930527, 0...
728,928
tables.table
reindex_dirty
Recompute the existing indexes in table, *if* they are dirty. This can be useful when you have set :attr:`Table.autoindex` (see :class:`Table`) to false for the table and you want to update the indexes after a invalidating index operation (:meth:`Table.remove_rows`, for example). ...
def reindex_dirty(self): """Recompute the existing indexes in table, *if* they are dirty. This can be useful when you have set :attr:`Table.autoindex` (see :class:`Table`) to false for the table and you want to update the indexes after a invalidating index operation (:meth:`Table.remove_rows`, for e...
(self)
[ 0.036634430289268494, 0.027171405032277107, 0.00405744556337595, 0.02986767143011093, 0.019726231694221497, -0.01728219725191593, -0.049298182129859924, -0.016029737889766693, -0.008127938024699688, -0.06864171475172043, -0.029154464602470398, -0.016595084220170975, 0.07072915136814117, 0....
728,930
tables.table
remove_row
Removes a row from the table. Parameters ---------- n : int The index of the row to remove. .. versionadded:: 3.0 Examples -------- Remove row 15:: table.remove_row(15) Which is equivalent to:: table.remove_rows(...
def remove_row(self, n): """Removes a row from the table. Parameters ---------- n : int The index of the row to remove. .. versionadded:: 3.0 Examples -------- Remove row 15:: table.remove_row(15) Which is equivalent to:: table.remove_rows(15, 16) .. warni...
(self, n)
[ -0.022395022213459015, 0.05026058480143547, -0.01981361210346222, -0.026822740212082863, -0.03511402755975723, 0.015719253569841385, -0.0366184264421463, 0.09929029643535614, -0.06602257490158081, -0.0746728703379631, -0.022309545427560806, 0.06882622838020325, -0.011830042116343975, 0.005...
728,931
tables.table
remove_rows
Remove a range of rows in the table. If only start is supplied, that row and all following will be deleted. If a range is supplied, i.e. both the start and stop parameters are passed, all the rows in the range are removed. .. versionchanged:: 3.0 The start, stop and step par...
def remove_rows(self, start=None, stop=None, step=None): """Remove a range of rows in the table. If only start is supplied, that row and all following will be deleted. If a range is supplied, i.e. both the start and stop parameters are passed, all the rows in the range are removed. .. versionchanged...
(self, start=None, stop=None, step=None)
[ -0.017632097005844116, 0.01474797073751688, -0.022365249693393707, -0.050251033157110214, -0.06139827147126198, 0.008807201869785786, -0.05187888443470001, 0.06249529868364334, -0.08386968076229095, -0.07962311804294586, 0.028628934174776077, 0.045509036630392075, 0.006254838313907385, 0.0...
728,935
tables.table
where
Iterate over values fulfilling a condition. This method returns a Row iterator (see :ref:`RowClassDescr`) which only selects rows in the table that satisfy the given condition (an expression-like string). The condvars mapping may be used to define the variable names appearing i...
def where(self, condition, condvars=None, start=None, stop=None, step=None): r"""Iterate over values fulfilling a condition. This method returns a Row iterator (see :ref:`RowClassDescr`) which only selects rows in the table that satisfy the given condition (an expression-like string). The ...
(self, condition, condvars=None, start=None, stop=None, step=None)
[ 0.08468981832265854, -0.031818490475416183, -0.026335982605814934, 0.015520486049354076, -0.01649736985564232, 0.01716523803770542, -0.0037754555232822895, 0.048684682697057724, -0.08492905646562576, -0.0462125726044178, 0.00925547257065773, 0.030203644186258316, 0.0030976177658885717, 0.0...
728,936
tables.table
will_query_use_indexing
Will a query for the condition use indexing? The meaning of the condition and *condvars* arguments is the same as in the :meth:`Table.where` method. If condition can use indexing, this method returns a frozenset with the path names of the columns whose index is usable. Otherwise, it ret...
def will_query_use_indexing(self, condition, condvars=None): """Will a query for the condition use indexing? The meaning of the condition and *condvars* arguments is the same as in the :meth:`Table.where` method. If condition can use indexing, this method returns a frozenset with the path names of the c...
(self, condition, condvars=None)
[ 0.03235352411866188, -0.01755603402853012, -0.026178767904639244, 0.043807875365018845, 0.05758232995867729, 0.01879829168319702, -0.012294704094529152, -0.004660752601921558, -0.037176407873630524, -0.07113756239414215, -0.014377313666045666, -0.0055627599358558655, 0.007672772277146578, ...
728,937
tables.atom
Time32Atom
Defines an atom of type time32.
class Time32Atom(TimeAtom): """Defines an atom of type time32.""" itemsize = 4 type = 'time32' _defvalue = 0 def __init__(self, shape=(), dflt=_defvalue): Atom.__init__(self, 'int32', shape, dflt)
(shape=(), dflt=0)
[ 0.053975269198417664, 0.04149985313415527, -0.03218875825405121, 0.02744227834045887, 0.03411644324660301, -0.03138858452439308, -0.039390310645103455, -0.004575986415147781, -0.01938599720597267, -0.030570225790143013, 0.03169774264097214, 0.026205649599432945, -0.0010871661361306906, 0.0...
728,939
tables.atom
__init__
null
def __init__(self, shape=(), dflt=_defvalue): Atom.__init__(self, 'int32', shape, dflt)
(self, shape=(), dflt=0)
[ 0.024723412469029427, 0.00290478253737092, 0.03595815226435661, -0.01631920039653778, 0.04147941991686821, 0.015506734140217304, -0.03517189249396324, -0.018311049789190292, -0.018066437914967537, -0.021525967866182327, 0.013532355427742004, 0.043366439640522, -0.02257431112229824, 0.01969...
728,945
tables.description
Time32Col
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 Time32Col
(*args, **kwargs)
[ 0.02193531021475792, 0.011939366348087788, -0.0019328591879457235, 0.038327645510435104, 0.0051247174851596355, -0.040118973702192307, -0.001603322452865541, 0.029573801904916763, -0.03366343677043915, -0.01889343373477459, -0.011694326065480709, 0.023371752351522446, -0.007651164662092924, ...
728,953
tables.atom
Time64Atom
Defines an atom of type time64.
class Time64Atom(TimeAtom): """Defines an atom of type time64.""" itemsize = 8 type = 'time64' _defvalue = 0.0 def __init__(self, shape=(), dflt=_defvalue): Atom.__init__(self, 'float64', shape, dflt)
(shape=(), dflt=0.0)
[ 0.07294519245624542, 0.06526483595371246, 0.017371801659464836, 0.05030451714992523, 0.03370621055364609, -0.04251496121287346, -0.06450043618679047, -0.031030826270580292, -0.01617060974240303, -0.010865339078009129, 0.0536532998085022, 0.05245210602879524, -0.01690770499408245, 0.0526341...
728,955
tables.atom
__init__
null
def __init__(self, shape=(), dflt=_defvalue): Atom.__init__(self, 'float64', shape, dflt)
(self, shape=(), dflt=0.0)
[ 0.03855642303824425, 0.016135599464178085, 0.07130297273397446, 0.008556356653571129, 0.03102119453251362, 0.006672549992799759, -0.052922651171684265, -0.04781700670719147, -0.02707752399146557, 0.019454268738627434, 0.023028219118714333, 0.03940149396657944, -0.04028178006410599, 0.05098...
728,961
tables.description
Time64Col
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 Time64Col
(*args, **kwargs)
[ 0.03286629915237427, 0.027826689183712006, 0.02986932173371315, 0.055452462285757065, 0.011720025911927223, -0.04708101600408554, -0.021464388817548752, 0.01891946978867054, -0.03737013787031174, -0.009618792682886124, 0.003396714571863413, 0.03326813131570816, -0.010531280189752579, 0.026...
728,969
tables.atom
TimeAtom
Defines an atom of time type (time kind). There are two distinct supported types of time: a 32 bit integer value and a 64 bit floating point value. Both of them reflect the number of seconds since the Unix epoch. This atom has the property of being stored using the HDF5 time datatypes.
class TimeAtom(Atom): """Defines an atom of time type (time kind). There are two distinct supported types of time: a 32 bit integer value and a 64 bit floating point value. Both of them reflect the number of seconds since the Unix epoch. This atom has the property of being stored using the HDF5 tim...
(itemsize=4, shape=(), dflt=0)
[ 0.06605794280767441, 0.04374257102608681, -0.0108431251719594, 0.052846357226371765, 0.058064378798007965, -0.04514884948730469, -0.04307644069194794, 0.02368464134633541, -0.03985681012272835, -0.0340096652507782, 0.043594542890787125, 0.012924782931804657, 0.01281376089900732, 0.05066292...
728,977
tables.description
TimeCol
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 TimeCol
(*args, **kwargs)
[ 0.03158324956893921, 0.01697370782494545, 0.012952961958944798, 0.025123419240117073, 0.0049031456001102924, -0.04718341305851936, 0.005756409838795662, 0.03756026178598404, -0.03692759573459625, -0.009231898933649063, -0.008857295848429203, -0.00012460774451028556, -0.004153938498347998, ...
728,985
tables.atom
UInt16Atom
Defines an atom of type ``uint16``.
from tables.atom import UInt16Atom
(shape=(), dflt=0)
[ 0.012896355241537094, 0.02422538585960865, 0.008258267305791378, -0.017061691731214523, 0.04558870196342468, 0.003530739340931177, -0.020732978358864784, 0.0014161288272589445, -0.07468642294406891, 0.0036223086062818766, 0.03175535798072815, 0.03402116522192955, 0.01862049661576748, 0.029...
728,993
tables.description
UInt16Col
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 UInt16Col
(*args, **kwargs)
[ -0.0009515018318779767, -0.008620426058769226, 0.015198499895632267, -0.0025976160541176796, 0.03376688063144684, 0.008067289367318153, 0.010671287775039673, 0.003635811386629939, -0.06998458504676819, -0.01218603178858757, 0.009139523841440678, 0.046497538685798645, 0.01590481400489807, 0...
729,001
tables.atom
UInt32Atom
Defines an atom of type ``uint32``.
from tables.atom import UInt32Atom
(shape=(), dflt=0)
[ -0.0024137268774211407, 0.017471587285399437, 0.006349471863359213, -0.003128358628600836, 0.05133543908596039, 0.008255156688392162, -0.03084511123597622, -0.012960342690348625, -0.06162276491522789, -0.029681462794542313, 0.015296071767807007, 0.027320437133312225, -0.003916772548109293, ...
729,009
tables.description
UInt32Col
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 UInt32Col
(*args, **kwargs)
[ -0.016494309529662132, -0.017347168177366257, 0.01086543407291174, 0.009381458163261414, 0.0435640811920166, 0.012545567937195301, 0.0067802355624735355, -0.009978460147976875, -0.061064764857292175, -0.04428048059344292, -0.004326131660491228, 0.04250653460621834, -0.008571241050958633, 0...
729,017
tables.atom
UInt64Atom
Defines an atom of type ``uint64``.
from tables.atom import UInt64Atom
(shape=(), dflt=0)
[ 0.017154013738036156, 0.04748794063925743, 0.03907023370265961, 0.03776230290532112, 0.04943307116627693, -0.01671803556382656, -0.047622088342905045, -0.030954357236623764, -0.0481586754322052, -0.01821041852235794, 0.0404452383518219, 0.06046663969755173, -0.017506148666143417, 0.0642898...
729,025
tables.description
UInt64Col
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 UInt64Col
(*args, **kwargs)
[ 0.0014708599774166942, 0.005134332459419966, 0.04720218852162361, 0.04723585769534111, 0.03999729081988335, -0.005664599593728781, -0.012945251539349556, -0.02545282058417797, -0.051343321800231934, -0.023769434541463852, 0.017860742285847664, 0.07083695381879807, -0.011968886479735374, 0....
729,033
tables.atom
UInt8Atom
Defines an atom of type ``uint8``.
from tables.atom import UInt8Atom
(shape=(), dflt=0)
[ 0.0001870414853328839, 0.010117243975400925, -0.006588960997760296, -0.0055177235044538975, 0.011919643729925156, -0.006435927469283342, -0.03931271657347679, 0.015626465901732445, -0.05774480476975441, -0.03645608574151993, 0.042101334780454636, 0.021900856867432594, -0.002004319569095969, ...
729,041
tables.description
UInt8Col
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 UInt8Col
(*args, **kwargs)
[ -0.010896371677517891, -0.02316324971616268, 0.005731592886149883, 0.006641034036874771, 0.002027207287028432, -0.0009966838406398892, 0.0014328982215374708, 0.011446266435086727, -0.053229790180921555, -0.04162278771400452, 0.019474726170301437, 0.028831394389271736, -0.0028996362816542387,...
729,049
tables.atom
UIntAtom
Defines an atom of an unsigned integral type (uint kind).
class UIntAtom(Atom): """Defines an atom of an unsigned integral type (uint kind).""" kind = 'uint' signed = False _deftype = 'uint32' _defvalue = 0 __init__ = _abstract_atom_init(_deftype, _defvalue)
(itemsize=4, shape=(), dflt=0)
[ -0.005588284693658352, 0.016245529055595398, 0.005481756292283535, 0.0015047088963910937, 0.0575251542031765, 0.006582546513527632, -0.015366672538220882, -0.045771557837724686, -0.06459151208400726, -0.03884723410010338, 0.03169209882616997, 0.050813887268304825, -0.00011381025251466781, ...
729,057
tables.description
UIntCol
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 UIntCol
(*args, **kwargs)
[ -0.0067915599793195724, -0.0185383353382349, 0.023818345740437508, 0.010326835326850414, 0.025134185329079628, 0.008711185306310654, 0.019204583019018173, -0.006645818240940571, -0.065192312002182, -0.03957509994506836, -0.007745126727968454, 0.051400989294052124, -0.010501725599169731, 0....
729,065
tables.unimplemented
UnImplemented
This class represents datasets not supported by PyTables in an HDF5 file. When reading a generic HDF5 file (i.e. one that has not been created with PyTables, but with some other HDF5 library based tool), chances are that the specific combination of datatypes or dataspaces in some dataset might not ...
class UnImplemented(hdf5extension.UnImplemented, Leaf): """This class represents datasets not supported by PyTables in an HDF5 file. When reading a generic HDF5 file (i.e. one that has not been created with PyTables, but with some other HDF5 library based tool), chances are that the specific combin...
(parentnode, name)
[ 0.0017481514951214194, -0.058728475123643875, -0.011357687413692474, 0.026068059727549553, -0.024090351536870003, -0.0154732009395957, -0.017375566065311432, 0.015171836130321026, -0.03414840251207352, -0.05970790982246399, 0.008216900750994682, 0.0000754147840780206, -0.026482434943318367, ...
729,067
tables.unimplemented
__init__
Create the `UnImplemented` instance.
def __init__(self, parentnode, name): """Create the `UnImplemented` instance.""" # UnImplemented objects always come from opening an existing node # (they can not be created). self._v_new = False """Is this the first time the node has been created?""" self.nrows = SizeType(0) """The length o...
(self, parentnode, name)
[ 0.003770934185013175, -0.022745316848158836, 0.016814958304166794, 0.002518560504540801, -0.036816105246543884, -0.0026981288101524115, -0.03127250820398331, 0.017717404291033745, -0.00848575308918953, -0.04346473515033722, 0.016759706661105156, 0.025599991902709007, -0.01306704618036747, ...
729,069
tables.unimplemented
__repr__
null
"""Here is defined the UnImplemented class.""" import warnings from . import hdf5extension from .utils import SizeType from .node import Node from .leaf import Leaf class UnImplemented(hdf5extension.UnImplemented, Leaf): """This class represents datasets not supported by PyTables in an HDF5 file. When ...
(self)
[ -0.008594569750130177, -0.07242604345083237, -0.012481816112995148, 0.020904958248138428, -0.031079445034265518, -0.010730470530688763, -0.02457444556057453, 0.008386075496673584, -0.03352576866745949, -0.05745156854391098, 0.01044321246445179, 0.000916213495656848, -0.023907264694571495, ...
729,074
tables.unimplemented
_f_copy
Do nothing. This method does nothing, since `UnImplemented` nodes can not be copied. However, a ``UserWarning`` is issued. Please note that this method *does not return a new node*, but ``None``.
def _f_copy(self, newparent=None, newname=None, overwrite=False, recursive=False, createparents=False, **kwargs): """Do nothing. This method does nothing, since `UnImplemented` nodes can not be copied. However, a ``UserWarning`` is issued. Please note that this method *does not...
(self, newparent=None, newname=None, overwrite=False, recursive=False, createparents=False, **kwargs)
[ -0.04438953846693039, -0.059853825718164444, 0.03363482654094696, 0.006778805982321501, -0.0963706374168396, -0.007420222740620375, 0.012837116606533527, 0.03131518512964249, 0.06002955883741379, -0.030137790367007256, 0.000590893963817507, -0.034952808171510696, -0.012072688899934292, 0.0...
729,086
tables.unimplemented
_g_copy
Do nothing. This method does nothing, but a ``UserWarning`` is issued. Please note that this method *does not return a new node*, but ``None``.
def _g_copy(self, newparent, newname, recursive, _log=True, **kwargs): """Do nothing. This method does nothing, but a ``UserWarning`` is issued. Please note that this method *does not return a new node*, but ``None``. """ warnings.warn( "UnImplemented node %r does not know how to copy it...
(self, newparent, newname, recursive, _log=True, **kwargs)
[ -0.03771138936281204, -0.029121574014425278, 0.03200230374932289, 0.022644292563199997, -0.08303489536046982, -0.011191204190254211, 0.020234953612089157, 0.04172695428133011, 0.059884291142225266, -0.027777232229709625, -0.016812995076179504, -0.03194992616772652, 0.01253554504364729, 0.0...
729,097
tables.unimplemented
_g_open
null
def _g_open(self): (self.shape, self.byteorder, object_id) = self._open_unimplemented() try: self.nrows = SizeType(self.shape[0]) except IndexError: self.nrows = SizeType(0) return object_id
(self)
[ 0.04118930920958519, -0.0571448914706707, -0.023054765537381172, 0.04020526260137558, 0.04143531993031502, -0.005746119190007448, 0.024196961894631386, 0.0622408390045166, -0.053595300763845444, -0.08968866616487503, -0.006712591741234064, -0.02860759012401104, -0.032912787050008774, 0.004...
729,120
tables.exceptions
UnclosedFileWarning
Warning raised when there are still open files at program exit Pytables will close remaining open files at exit, but raise this warning.
class UnclosedFileWarning(Warning): """Warning raised when there are still open files at program exit Pytables will close remaining open files at exit, but raise this warning. """ pass
null
[ -0.016836270689964294, -0.003912563435733318, -0.007700509391725063, -0.017265986651182175, 0.010760086588561535, -0.03657741844654083, 0.004447559826076031, 0.06982024759054184, -0.0749424546957016, -0.0829867422580719, -0.0028017477598041296, -0.05630997568368912, 0.012281280942261219, -...
729,121
tables.exceptions
UndoRedoError
Problems with doing/redoing actions with Undo/Redo feature. This exception indicates a problem related to the Undo/Redo mechanism, such as trying to undo or redo actions with this mechanism disabled, or going to a nonexistent mark.
class UndoRedoError(Exception): """Problems with doing/redoing actions with Undo/Redo feature. This exception indicates a problem related to the Undo/Redo mechanism, such as trying to undo or redo actions with this mechanism disabled, or going to a nonexistent mark. """ pass
null
[ -0.045835260301828384, -0.0032939575612545013, 0.017061706632375717, 0.058414652943611145, 0.015227210707962513, -0.06622255593538284, -0.036906782537698746, 0.05114896968007088, 0.0430157408118248, -0.011368446052074432, 0.07764521986246109, 0.030852045863866806, 0.03383423015475273, 0.02...
729,122
tables.exceptions
UndoRedoWarning
Issued when an action not supporting Undo/Redo is run. This warning is only shown when the Undo/Redo mechanism is enabled.
class UndoRedoWarning(Warning): """Issued when an action not supporting Undo/Redo is run. This warning is only shown when the Undo/Redo mechanism is enabled. """ pass
null
[ -0.033676259219646454, -0.0015907344641163945, 0.03222591429948807, 0.006150692701339722, 0.05843821167945862, -0.04114021733403206, 0.014583022333681583, 0.041635457426309586, 0.04078647494316101, -0.028352437540888786, 0.02798100933432579, 0.003990654367953539, 0.043687161058187485, -0.0...
729,123
tables.unimplemented
Unknown
This class represents nodes reported as *unknown* by the underlying HDF5 library. This class does not have any public instance variables or methods, except those inherited from the Node class.
class Unknown(Node): """This class represents nodes reported as *unknown* by the underlying HDF5 library. This class does not have any public instance variables or methods, except those inherited from the Node class. """ # Class identifier _c_classid = 'UNKNOWN' def __init__(self, pa...
(parentnode, name)
[ 0.016870174556970596, -0.06807509064674377, -0.023513352498412132, 0.03248164430260658, -0.015934886410832405, 0.017359672114253044, -0.012517145834863186, 0.03737661615014076, -0.03471934422850609, -0.06478846818208694, 0.005480621941387653, 0.019737230613827705, 0.007482316344976425, 0.0...
729,125
tables.unimplemented
__init__
Create the `Unknown` instance.
def __init__(self, parentnode, name): """Create the `Unknown` instance.""" self._v_new = False super().__init__(parentnode, name)
(self, parentnode, name)
[ 0.03629821911454201, -0.05659884959459305, 0.017645932734012604, 0.028924059122800827, -0.07447034120559692, 0.0006647588452324271, 0.0008756815223023295, 0.03650643303990364, 0.043412115424871445, -0.021879566833376884, -0.023423803970217705, 0.02918432466685772, -0.016726331785321236, 0....
729,141
tables.unimplemented
_g_copy
null
def _g_copy(self, newparent, newname, recursive, _log=True, **kwargs): # Silently avoid doing copies of unknown nodes return None
(self, newparent, newname, recursive, _log=True, **kwargs)
[ -0.02190009318292141, -0.0158732570707798, 0.020572291687130928, 0.03604030981659889, -0.09160102158784866, 0.017330389469861984, 0.0157870352268219, 0.04690413549542427, 0.09636040776968002, -0.022658836096525192, -0.01152772642672062, -0.032488010823726654, 0.0052379160188138485, 0.03138...
729,145
tables.unimplemented
_g_delete
null
def _g_delete(self, parent): pass
(self, parent)
[ -0.010736133903265, 0.0023674126714468002, -0.009270986542105675, 0.023790013045072556, -0.029054610058665276, -0.005806783214211464, 0.011977783404290676, 0.1415812075138092, 0.07595586776733398, -0.0008370790164917707, -0.018343308940529823, -0.03034592606127262, 0.008124529384076595, -0...
729,152
tables.unimplemented
_g_new
null
def _g_new(self, parentnode, name, init=False): pass
(self, parentnode, name, init=False)
[ 0.0061201187781989574, 0.002772650448605418, 0.03722790256142616, 0.007552936673164368, -0.08960394561290741, 0.03328871354460716, -0.0008284138748422265, 0.07918959856033325, 0.07560544461011887, -0.02378731220960617, 0.005946828052401543, 0.026188021525740623, 0.013990050181746483, 0.029...
729,153
tables.unimplemented
_g_open
null
def _g_open(self): return 0
(self)
[ 0.020423363894224167, -0.06723261624574661, -0.008583981543779373, 0.0957430899143219, 0.04060685634613037, -0.005302878562361002, 0.0034588647540658712, 0.0680207684636116, -0.023387493565678596, -0.06500523537397385, -0.007684462238103151, -0.034661464393138885, 0.012473329901695251, 0.0...
729,162
tables.vlarray
VLArray
This class represents variable length (ragged) arrays in an HDF5 file. Instances of this class represent array objects in the object tree with the property that their rows can have a *variable* number of homogeneous elements, called *atoms*. Like Table datasets (see :ref:`TableClassDescr`), variable le...
class VLArray(hdf5extension.VLArray, Leaf): """This class represents variable length (ragged) arrays in an HDF5 file. Instances of this class represent array objects in the object tree with the property that their rows can have a *variable* number of homogeneous elements, called *atoms*. Like Table dat...
(parentnode, name, atom=None, title='', filters=None, expectedrows=None, chunkshape=None, byteorder=None, _log=True, track_times=True)
[ 0.04818424955010414, -0.025962019339203835, -0.06688319891691208, 0.056018125265836716, 0.022143496200442314, -0.0029426247347146273, -0.057435307651758194, -0.010077751241624355, -0.03476036712527275, -0.036453116685152054, -0.029662443324923515, -0.04668833315372467, 0.005914773792028427, ...
729,164
tables.vlarray
__getitem__
Get a row or a range of rows from the array. If key argument is an integer, the corresponding array row is returned as an object of the current flavor. If key is a slice, the range of rows determined by it is returned as a list of objects of the current flavor. In addition, Nu...
def __getitem__(self, key): """Get a row or a range of rows from the array. If key argument is an integer, the corresponding array row is returned as an object of the current flavor. If key is a slice, the range of rows determined by it is returned as a list of objects of the current flavor. In...
(self, key)
[ 0.047312360256910324, -0.07949662953615189, -0.07586292177438736, 0.02973707765340805, 0.006808567326515913, 0.012254494242370129, -0.006155055947601795, 0.00016366748604923487, 0.029811235144734383, -0.06566628813743591, -0.029681460931897163, 0.011911517009139061, -0.026344381272792816, ...
729,165
tables.vlarray
__init__
null
def __init__(self, parentnode, name, atom=None, title="", filters=None, expectedrows=None, chunkshape=None, byteorder=None, _log=True, track_times=True): self._v_version = None """The object version of this array.""" self._v_new = new = atom is not None """Is this ...
(self, parentnode, name, atom=None, title='', filters=None, expectedrows=None, chunkshape=None, byteorder=None, _log=True, track_times=True)
[ 0.046471379697322845, -0.006283022463321686, -0.06627821922302246, 0.04072471335530281, -0.025725912302732468, -0.003000238910317421, -0.06371137499809265, 0.018590467050671577, -0.007168966811150312, -0.029499555006623268, -0.0005067242891527712, -0.029786888509988785, -0.008691833354532719...
729,166
tables.vlarray
__iter__
Iterate over the rows of the array. This is equivalent to calling :meth:`VLArray.iterrows` with default arguments, i.e. it iterates over *all the rows* in the array. Examples -------- :: result = [row for row in vlarray] Which is equivalent to:: ...
def __iter__(self): """Iterate over the rows of the array. This is equivalent to calling :meth:`VLArray.iterrows` with default arguments, i.e. it iterates over *all the rows* in the array. Examples -------- :: result = [row for row in vlarray] Which is equivalent to:: result ...
(self)
[ 0.04101388901472092, -0.05971192196011543, -0.04642270505428314, 0.02670380100607872, -0.0372886098921299, 0.001277206465601921, -0.03345587104558945, 0.002789481543004513, 0.0472823865711689, -0.00769234262406826, -0.006223723292350769, -0.013665325939655304, 0.007490855176001787, 0.04738...
729,168
tables.vlarray
__next__
Get the next element of the array during an iteration. The element is returned as a list of objects of the current flavor.
def __next__(self): """Get the next element of the array during an iteration. The element is returned as a list of objects of the current flavor. """ if self._nrowsread >= self._stop: self._init = False raise StopIteration # end of iteration else: # Read a chunk of...
(self)
[ 0.02842206135392189, -0.04604052007198334, -0.09286805987358093, 0.019049400463700294, -0.005240820813924074, 0.03995902091264725, 0.0002115668321494013, 0.014613483101129532, -0.0006338620441965759, -0.0360775962471962, 0.00011284030188107863, -0.016920875757932663, -0.007552684750407934, ...
729,169
tables.vlarray
__repr__
This provides more metainfo in addition to standard __str__
"""Here is defined the VLArray class.""" import operator import sys import numpy as np from . import hdf5extension from .atom import ObjectAtom, VLStringAtom, VLUnicodeAtom from .flavor import internal_to_flavor from .leaf import Leaf, calc_chunksize from .utils import ( convert_to_np_atom, convert_to_np_atom2, i...
(self)
[ 0.05685191601514816, -0.028775935992598534, -0.0741952508687973, 0.05708523467183113, 0.026559410616755486, -0.00019716619863174856, -0.05716300755739212, -0.01808217540383339, -0.0474025197327137, -0.034997761249542236, -0.030350835993885994, -0.04849134013056755, -0.003276179078966379, 0...
729,170
tables.vlarray
__setitem__
Set a row, or set of rows, in the array. It takes different actions depending on the type of the *key* parameter: if it is an integer, the corresponding table row is set to *value* (a record or sequence capable of being converted to the table structure). If *key* is a slice, the row sl...
def __setitem__(self, key, value): """Set a row, or set of rows, in the array. It takes different actions depending on the type of the *key* parameter: if it is an integer, the corresponding table row is set to *value* (a record or sequence capable of being converted to the table structure). If *ke...
(self, key, value)
[ 0.061756428331136703, -0.039158403873443604, -0.07479006052017212, 0.0621781051158905, -0.033638276159763336, -0.02894233539700508, -0.06436315178871155, 0.030667375773191452, -0.028597326949238777, -0.057654667645692825, -0.06746822595596313, -0.03821921721100807, 0.009665015153586864, 0....
729,172
tables.vlarray
_assign_values
Assign the `values` to the positions stated in `coords`.
def _assign_values(self, coords, values): """Assign the `values` to the positions stated in `coords`.""" for nrow, value in zip(coords, values): if nrow >= self.nrows: raise IndexError("First index out of range") if nrow < 0: # To support negative values nrow ...
(self, coords, values)
[ 0.052623458206653595, -0.02348453737795353, -0.06099194288253784, 0.03912832960486412, -0.02979859709739685, -0.0010419378522783518, -0.041691649705171585, 0.0122982831671834, 0.02327721007168293, -0.014965266920626163, -0.032569244503974915, -0.02536933124065399, 0.020450018346309662, 0.0...
729,173
tables.vlarray
_calc_chunkshape
Calculate the size for the HDF5 chunk.
def _calc_chunkshape(self, expectedrows): """Calculate the size for the HDF5 chunk.""" # For computing the chunkshape for HDF5 VL types, we have to # choose the itemsize of the *each* element of the atom and # not the size of the entire atom. I don't know why this # should be like this, perhaps I s...
(self, expectedrows)
[ -0.015268171206116676, -0.03370504081249237, -0.04298100993037224, 0.020959436893463135, 0.00282129249535501, 0.04432637616991997, 0.022074677050113678, 0.03657280281186104, -0.08405017852783203, -0.0328376330435276, 0.053071279078722, 0.011099296621978283, -0.018675850704312325, 0.0073995...
729,190
tables.vlarray
_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.""" # Build the new VLArray object object = VLArray( group, name, self.atom, title=title, filters=filters, exp...
(self, group, name, start, stop, step, title, filters, chunkshape, _log, **kwargs)
[ 0.006004961207509041, 0.007372886873781681, -0.0446639284491539, 0.038468848913908005, -0.022665830329060555, -0.007484175730496645, -0.02732141502201557, -0.011796618811786175, -0.04210428521037102, -0.022072289139032364, -0.004579072818160057, -0.03169877454638481, 0.0028262732084840536, ...
729,191
tables.vlarray
_g_create
Create a variable length array (ragged array).
def _g_create(self): """Create a variable length array (ragged array).""" atom = self.atom self._v_version = obversion # Check for zero dims in atom shape (not allowed in VLArrays) zerodims = np.sum(np.array(atom.shape) == 0) if zerodims > 0: raise ValueError("When creating VLArrays, non...
(self)
[ 0.04467025026679039, -0.0007036564638838172, -0.04001406580209732, 0.02893744595348835, 0.04739848151803017, 0.008816735818982124, -0.0620945580303669, -0.023099029436707497, -0.022044112905859947, -0.034139275550842285, -0.002919208025559783, 0.0033261694479733706, -0.021280208602547646, ...
729,200
tables.vlarray
_g_open
Get the metadata info for an array in file.
def _g_open(self): """Get the metadata info for an array in file.""" self._v_objectid, self.nrows, self._v_chunkshape, atom = \ self._open_array() # Check if the atom can be a PseudoAtom if "PSEUDOATOM" in self.attrs: kind = self.attrs.PSEUDOATOM if kind == 'vlstring': ...
(self)
[ 0.07722492516040802, -0.03440310060977936, -0.030992982909083366, 0.049304597079753876, 0.0834057629108429, -0.021011289209127426, -0.01434202492237091, 0.019519362598657608, -0.02063830755650997, -0.04021095484495163, -0.028151219710707664, -0.02127770520746708, -0.02264530211687088, -0.0...
729,201
tables.vlarray
_g_post_init_hook
null
def _g_post_init_hook(self): super()._g_post_init_hook() self.nrowsinbuf = 100 # maybe enough for most applications
(self)
[ -0.015137074515223503, 0.018846970051527023, -0.06775809079408646, 0.020841913297772408, 0.010919692926108837, 0.06611313670873642, -0.04836864024400711, 0.01370211411267519, -0.0070085530169308186, -0.05767837539315224, 0.018164489418268204, -0.0015596436569467187, -0.032251592725515366, ...
729,209
tables.vlarray
_getnobjects
Return the number of objects in a NumPy array.
def _getnobjects(self, nparr): """Return the number of objects in a NumPy array.""" # Check for zero dimensionality array zerodims = np.sum(np.array(nparr.shape) == 0) if zerodims > 0: # No objects to be added return 0 shape = nparr.shape atom_shape = self.atom.shape shapelen...
(self, nparr)
[ -0.023510565981268883, -0.02488081343472004, -0.056144095957279205, 0.02983894571661949, 0.0378260463476181, 0.012178977951407433, -0.04482152312994003, 0.004394708666950464, -0.007725672796368599, -0.007423677481710911, 0.014549866318702698, -0.002785569289699197, -0.024141600355505943, -...
729,214
tables.vlarray
_read_coordinates
Read rows specified in `coords`.
def _read_coordinates(self, coords): """Read rows specified in `coords`.""" rows = [] for coord in coords: rows.append(self.read(idx2long(coord), idx2long(coord) + 1, 1)[0]) return rows
(self, coords)
[ -0.015828808769583702, 0.004158706869930029, -0.04489688202738762, 0.036322228610515594, -0.0029646861366927624, 0.03831154853105545, -0.0183840561658144, 0.0679798498749733, 0.06252636760473251, -0.01415675226598978, 0.02213975414633751, 0.02642708085477352, -0.049424298107624054, 0.02021...
729,215
tables.vlarray
append
Add a sequence of data to the end of the dataset. This method appends the objects in the sequence to a *single row* in this array. The type and shape of individual objects must be compliant with the atoms in the array. In the case of serialized objects and variable length strings, the o...
def append(self, sequence): """Add a sequence of data to the end of the dataset. This method appends the objects in the sequence to a *single row* in this array. The type and shape of individual objects must be compliant with the atoms in the array. In the case of serialized objects and variable len...
(self, sequence)
[ -0.010470962151885033, 0.052460577338933945, -0.05196699500083923, 0.06018158793449402, 0.04139026626944542, -0.02660047449171543, -0.09187652170658112, 0.03426860272884369, 0.02030731923878193, -0.04093194380402565, -0.019796110689640045, -0.032347165048122406, 0.012224935926496983, 0.040...
729,223
tables.vlarray
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. If a range is not supplied, *all the rows* in the array are iterated upon. You can also use the :meth:`VLArray.__iter__` special method for ...
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. If a range is not supplied, *all the rows* in the array are iterated upon. You can also use the :m...
(self, start=None, stop=None, step=None)
[ 0.024425411596894264, -0.04985583946108818, -0.0511121042072773, -0.0037261764518916607, -0.04432826489210129, 0.03758031874895096, -0.04231823980808258, -0.0077305263839662075, -0.01880810596048832, -0.0038136665243655443, 0.009314320050179958, -0.0262918658554554, -0.01315490622073412, 0...
729,225
tables.vlarray
read
Get data in the array as a list of objects of the current flavor. Please note that, as the lengths of the different rows are variable, the returned value is a *Python list* (not an array of the current flavor), with as many entries as specified rows in the range parameters. The...
def read(self, start=None, stop=None, step=1): """Get data in the array as a list of objects of the current flavor. Please note that, as the lengths of the different rows are variable, the returned value is a *Python list* (not an array of the current flavor), with as many entries as specified rows in t...
(self, start=None, stop=None, step=1)
[ 0.04111438989639282, -0.018853159621357918, -0.08904492110013962, -0.04600895941257477, 0.02329452894628048, 0.04289093613624573, -0.004133192822337151, -0.00817121285945177, -0.0069566345773637295, -0.042310841381549835, 0.005107574630528688, 0.01607956923544407, -0.043833594769239426, -0...
729,230
tables.atom
VLStringAtom
Defines an atom of type ``vlstring``. This class describes a *row* of the VLArray class, rather than an atom. It differs from the StringAtom class in that you can only add *one instance of it to one specific row*, i.e. the :meth:`VLArray.append` method only accepts one object when the base atom is of t...
class VLStringAtom(_BufferedAtom): """Defines an atom of type ``vlstring``. This class describes a *row* of the VLArray class, rather than an atom. It differs from the StringAtom class in that you can only add *one instance of it to one specific row*, i.e. the :meth:`VLArray.append` method only acc...
()
[ 0.04005822539329529, -0.009117862209677696, -0.061578866094350815, 0.03885079547762871, 0.0368620902299881, -0.04517203941941261, -0.0304520633071661, 0.02894277684390545, 0.05323340371251106, -0.0655207633972168, -0.009233278222382069, 0.003955217078328133, -0.036471448838710785, 0.029244...
729,232
tables.atom
_tobuffer
null
def _tobuffer(self, object_): if isinstance(object_, str): warnings.warn("Storing non bytestrings in VLStringAtom is " "deprecated.", DeprecationWarning) elif not isinstance(object_, bytes): raise TypeError(f"object is not a string: {object_!r}") return np.bytes_(object...
(self, object_)
[ 0.008487959392368793, -0.02616298757493496, -0.05798747390508652, -0.033643029630184174, 0.01017354242503643, -0.08049622178077698, -0.0018775160424411297, 0.08708415180444717, 0.02060442604124546, -0.03798351064324379, 0.02708941511809826, -0.00824777502566576, -0.02528802864253521, 0.038...
729,233
tables.atom
fromarray
null
def fromarray(self, array): return array.tobytes()
(self, array)
[ -0.01824842393398285, -0.0008843133691698313, 0.0006362083368003368, -0.005504796747118235, -0.015567375347018242, -0.031238533556461334, -0.06123167648911476, 0.022918635979294777, 0.034317415207624435, -0.024458076804876328, 0.019095979630947113, -0.008246384561061859, 0.02464834414422512,...
729,235
tables.atom
VLUnicodeAtom
Defines an atom of type vlunicode. This class describes a *row* of the VLArray class, rather than an atom. It is very similar to VLStringAtom (see :ref:`VLStringAtom`), but it stores Unicode strings (using 32-bit characters a la UCS-4, so all strings of the same length also take up the same space). ...
class VLUnicodeAtom(_BufferedAtom): """Defines an atom of type vlunicode. This class describes a *row* of the VLArray class, rather than an atom. It is very similar to VLStringAtom (see :ref:`VLStringAtom`), but it stores Unicode strings (using 32-bit characters a la UCS-4, so all strings of the s...
()
[ 0.02469494938850403, -0.014117917977273464, -0.02907542884349823, 0.05899044871330261, 0.023362552747130394, -0.02365458570420742, -0.03453277423977852, 0.020058942958712578, 0.06475807726383209, -0.03832918778061867, 0.02055174671113491, 0.0004805407952517271, 0.004485427867621183, 0.0291...
729,237
tables.atom
_tobuffer
null
def _tobuffer(self, object_): # This works (and is used) only with UCS-4 builds of Python, # where the width of the internal representation of a # character matches that of the base atoms. if isinstance(object_, bytes): warnings.warn("Storing bytestrings in VLUnicodeAtom is " ...
(self, object_)
[ 0.006450098939239979, -0.013587034307420254, -0.05061456561088562, -0.014423565939068794, 0.02729734778404236, -0.08939441293478012, -0.00896849948912859, 0.07104355096817017, 0.01658974215388298, -0.044239312410354614, 0.0326511487364769, -0.024937447160482407, -0.01953081227838993, 0.045...
729,238
tables.atom
fromarray
null
def fromarray(self, array): length = len(array) if length == 0: return '' # ``array.view('U0')`` raises a `TypeError` return array.view('U%d' % length).item()
(self, array)
[ -0.018926547840237617, -0.01065269485116005, 0.023979416117072105, -0.012085208669304848, 0.0345713347196579, -0.0036767858546227217, 0.005586804356426001, 0.018284086138010025, 0.06987195461988449, -0.025142790749669075, 0.006068650167435408, 0.024986516684293747, 0.019725283607840538, 0....
729,239
tables.atom
toarray
null
def toarray(self, object_): if isinstance(object_, bytes): warnings.warn("Storing bytestrings in VLUnicodeAtom is " "deprecated.", DeprecationWarning) elif not isinstance(object_, str): raise TypeError(f"object is not a string: {object_!r}") ustr = str(object_) uarr...
(self, object_)
[ -0.01574854552745819, 0.01689567230641842, -0.006335876882076263, -0.02470325119793415, 0.00763862207531929, -0.0496554896235466, -0.021999944001436234, 0.06744040548801422, 0.03203063830733299, 0.012289377860724926, 0.013294225558638573, 0.006455925293266773, 0.006673790514469147, 0.05324...
729,247
tables.path
check_name_validity
Check the validity of the `name` of a Node object, which more limited than attribute names. If the name is not valid, a ``ValueError`` is raised. If it is valid but it can not be used with natural naming, a `NaturalNameWarning` is issued. >>> warnings.simplefilter("ignore") >>> check_name_val...
def check_name_validity(name): """Check the validity of the `name` of a Node object, which more limited than attribute names. If the name is not valid, a ``ValueError`` is raised. If it is valid but it can not be used with natural naming, a `NaturalNameWarning` is issued. >>> warnings.simplef...
(name)
[ 0.004204117227345705, 0.04084780439734459, 0.022191179916262627, 0.009956879541277885, -0.041649457067251205, -0.005807420704513788, -0.011869912967085838, -0.009319202043116093, 0.07127413153648376, -0.03532733768224716, 0.020879385992884636, 0.06340336799621582, 0.07899913936853409, 0.00...
729,250
tables.file
copy_file
An easy way of copying one PyTables file to another. This function allows you to copy an existing PyTables file named srcfilename to another file called dstfilename. The source file must exist and be readable. The destination file can be overwritten in place if existing by asserting the overwrite a...
def copy_file(srcfilename, dstfilename, overwrite=False, **kwargs): """An easy way of copying one PyTables file to another. This function allows you to copy an existing PyTables file named srcfilename to another file called dstfilename. The source file must exist and be readable. The destination file c...
(srcfilename, dstfilename, overwrite=False, **kwargs)
[ -0.04399381950497627, -0.06656581163406372, 0.014188366010785103, -0.0231111329048872, -0.04870230704545975, -0.027837593108415604, 0.007700715679675341, 0.05934133753180504, 0.012337318621575832, -0.05240440368652344, -0.01946295239031315, -0.017396248877048492, -0.024728551506996155, 0.0...
729,251
tables.description
descr_from_dtype
Get a description instance and byteorder from a (nested) NumPy dtype.
def descr_from_dtype(dtype_, ptparams=None): """Get a description instance and byteorder from a (nested) NumPy dtype.""" fields = {} fbyteorder = '|' for name in dtype_.names: dtype, offset = dtype_.fields[name][:2] kind = dtype.base.kind byteorder = dtype.base.byteorder ...
(dtype_, ptparams=None)
[ 0.050642646849155426, -0.013446308672428131, 0.02775953896343708, 0.010249536484479904, 0.01629992388188839, -0.0462719164788723, 0.053676869720220566, -0.01921675354242325, 0.019307056441903114, -0.016643080860376358, -0.05230424553155899, 0.02635079249739647, -0.05952858924865723, -0.031...
729,253
tables.description
dtype_from_descr
Get a (nested) NumPy dtype from a description instance and byteorder. The descr parameter can be a Description or IsDescription instance, sub-class of IsDescription or a dictionary.
def dtype_from_descr(descr, byteorder=None, ptparams=None): """Get a (nested) NumPy dtype from a description instance and byteorder. The descr parameter can be a Description or IsDescription instance, sub-class of IsDescription or a dictionary. """ if isinstance(descr, dict): descr = Desc...
(descr, byteorder=None, ptparams=None)
[ 0.05431118980050087, 0.025526966899633408, 0.014755011536180973, -0.001981570618227124, -0.008935323916375637, -0.0328734926879406, 0.02855408936738968, -0.00004840519977733493, -0.028784221038222313, 0.016622623428702354, -0.01906556449830532, 0.03657330945134163, -0.064543217420578, -0.0...
729,261
tables
get_hdf5_version
null
def get_hdf5_version(): warnings.warn( "the 'get_hdf5_version()' function is deprecated and could be " "removed in future versions. Please use 'tables.hdf5_version'", DeprecationWarning) return hdf5_version
()
[ 0.004788082093000412, -0.04370487481355667, -0.020527539774775505, -0.028644638136029243, 0.018699515610933304, 0.011789918877184391, -0.001969528617337346, 0.03245162591338158, -0.05376739427447319, -0.04769634082913399, 0.018414409831166267, -0.021282227709889412, -0.012075022794306278, ...
729,262
tables
get_pytables_version
null
def get_pytables_version(): warnings.warn( "the 'get_pytables_version()' function is deprecated and could be " "removed in future versions. Please use 'tables.__version__'", DeprecationWarning) return __version__
()
[ 0.027501538395881653, -0.029151977971196175, -0.01228274591267109, -0.025399398058652878, 0.013993991538882256, -0.011431466788053513, 0.02425277791917324, 0.01355097908526659, -0.05274457857012749, -0.03238336369395256, 0.005407361779361963, -0.039888523519039154, -0.05267508700489998, 0....
729,277
tables.file
open_file
Open a PyTables (or generic HDF5) file and return a File object. Parameters ---------- filename : str The name of the file (supports environment variable expansion). It is suggested that file names have any of the .h5, .hdf or .hdf5 extensions, although this is not mandatory. mo...
def open_file(filename, mode="r", title="", root_uep="/", filters=None, **kwargs): """Open a PyTables (or generic HDF5) file and return a File object. Parameters ---------- filename : str The name of the file (supports environment variable expansion). It is suggested that ...
(filename, mode='r', title='', root_uep='/', filters=None, **kwargs)
[ 0.010283415205776691, -0.022751441225409508, -0.000009091012543649413, -0.004408583510667086, 0.019425321370363235, -0.004179790150374174, -0.018884088844060898, 0.027120662853121758, -0.051210422068834305, -0.04101557284593582, 0.009476486593484879, -0.0011150616919621825, -0.00765597773715...
729,283
tables.tests.common
print_versions
Print all the versions of software that PyTables relies on.
def print_versions(): """Print all the versions of software that PyTables relies on.""" print('-=' * 38) print("PyTables version: %s" % tb.__version__) print("HDF5 version: %s" % tb.which_lib_version("hdf5")[1]) print("NumPy version: %s" % np.__version__) tinfo = tb.which_lib_ve...
()
[ 0.037567030638456345, -0.015005500987172127, -0.04142254218459129, 0.011256547644734383, 0.00702807679772377, -0.02290058322250843, -0.05258221924304962, -0.022784337401390076, -0.06540809571743011, -0.049831047654151917, -0.010723750106990337, -0.003603645134717226, -0.04289500042796135, ...
729,287
tables.flavor
restrict_flavors
Disable all flavors except those in keep. Providing an empty keep sequence implies disabling all flavors (but the internal one). If the sequence is not specified, only optional flavors are disabled. .. important:: Once you disable a flavor, it can not be enabled again.
def restrict_flavors(keep=('python',)): """Disable all flavors except those in keep. Providing an empty keep sequence implies disabling all flavors (but the internal one). If the sequence is not specified, only optional flavors are disabled. .. important:: Once you disable a flavor, it can not be...
(keep=('python',))
[ 0.07413473725318909, -0.007526061497628689, -0.05508141592144966, -0.0000194356052816147, -0.03571631386876106, -0.024509498849511147, 0.03720593824982643, -0.035456497222185135, 0.02960193157196045, 0.011735113337635994, -0.016022110357880592, 0.04856864735484123, -0.04025446996092796, -0...
729,288
tables.description
same_position
Decorate `oldmethod` to also compare the `_v_pos` attribute.
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...
(oldmethod)
[ 0.04642690345644951, -0.050830062478780746, 0.03536617010831833, 0.04744843393564224, -0.03719788044691086, -0.04896312206983566, 0.008797510527074337, 0.046462126076221466, 0.041988518089056015, -0.01743650808930397, -0.024710524827241898, -0.07580477744340897, 0.057804662734270096, 0.028...
729,289
tables.atom
split_type
Split a PyTables type into a PyTables kind and an item size. Returns a tuple of (kind, itemsize). If no item size is present in the type (in the form of a precision), the returned item size is None:: >>> split_type('int32') ('int', 4) >>> split_type('string') ('string', None) ...
def split_type(type): """Split a PyTables type into a PyTables kind and an item size. Returns a tuple of (kind, itemsize). If no item size is present in the type (in the form of a precision), the returned item size is None:: >>> split_type('int32') ('int', 4) >>> split_type('string...
(type)
[ -0.0031090467236936092, 0.023003675043582916, -0.03367394208908081, -0.016145553439855576, -0.0009693872416391969, -0.004779195878654718, 0.033524446189403534, -0.016304392367601395, -0.0956026017665863, -0.004398448392748833, 0.0030903597362339497, -0.010109657421708107, 0.00464371498674154...
729,292
tables.tests.test_suite
test
Run all the tests in the test suite. If *verbose* is set, the test suite will emit messages with full verbosity (not recommended unless you are looking into a certain problem). If *heavy* is set, the test suite will be run in *heavy* mode (you should be careful with this because it can take a lot ...
def test(verbose=False, heavy=False): """Run all the tests in the test suite. If *verbose* is set, the test suite will emit messages with full verbosity (not recommended unless you are looking into a certain problem). If *heavy* is set, the test suite will be run in *heavy* mode (you should be...
(verbose=False, heavy=False)
[ -0.0020758635364472866, 0.0004693281080108136, -0.017133403569459915, 0.024486489593982697, 0.03780057281255722, -0.007321853190660477, -0.009708928875625134, -0.030697347596287727, -0.0035917682107537985, -0.009209204465150833, -0.01945355162024498, 0.07931338250637054, -0.00311212218366563...
729,300
cryptography.hazmat.primitives.ciphers.algorithms
AES
null
class AES(BlockCipherAlgorithm): name = "AES" block_size = 128 # 512 added to support AES-256-XTS, which uses 512-bit keys key_sizes = frozenset([128, 192, 256, 512]) def __init__(self, key: bytes): self.key = _verify_key_size(self, key) @property def key_size(self) -> int: ...
(key: bytes)
[ 0.06461650133132935, -0.09101854264736176, 0.0016744282329455018, 0.052174583077430725, 0.012775181792676449, -0.028179459273815155, -0.021273454651236534, -0.03806633874773979, 0.012266025878489017, 0.0038695840630680323, 0.043509677052497864, 0.0038232970982789993, -0.01212716568261385, ...
729,301
cryptography.hazmat.primitives.ciphers.algorithms
__init__
null
def __init__(self, key: bytes): self.key = _verify_key_size(self, key)
(self, key: bytes)
[ 0.027599433436989784, -0.01354712899774313, -0.05486208200454712, 0.0871596485376358, -0.005889507010579109, -0.023170726373791695, 0.009749891236424446, 0.0355306938290596, 0.0516626350581646, -0.023574866354465485, 0.015433117747306824, 0.046038348227739334, 0.04300729185342789, 0.043950...
729,302
tinytuya.core
AESCipher
null
class AESCipher(_AESCipher_PyCrypto): CRYPTOLIB = CRYPTOLIB CRYPTOLIB_VER = '.'.join( [str(x) for x in Crypto.version_info] ) CRYPTOLIB_HAS_GCM = getattr( AES, 'MODE_GCM', False ) # only PyCryptodome supports GCM, PyCrypto does not
(key)
[ 0.07175219804048538, -0.06451911479234695, 0.015813330188393593, 0.04813617840409279, 0.045857757329940796, -0.07240317761898041, 0.007716796826571226, -0.013905605301260948, 0.004764794372022152, -0.000725003716070205, 0.049004148691892624, 0.0011312996502965689, -0.01280255988240242, 0.0...
729,304
tinytuya.core
_pad
null
@staticmethod def _pad(s, bs): padnum = bs - len(s) % bs return s + padnum * chr(padnum).encode()
(s, bs)
[ -0.03802767023444176, 0.01583024673163891, -0.01589163765311241, 0.0709686130285263, -0.036238547414541245, -0.001997417537495494, -0.01229584775865078, 0.01255895383656025, 0.014093742705881596, -0.013427205383777618, 0.01225199643522501, 0.030976414680480957, 0.04813096299767494, 0.07451...
729,305
tinytuya.core
_unpad
null
@staticmethod def _unpad(s, verify_padding=False): padlen = ord(s[-1:]) if padlen < 1 or padlen > 16: raise ValueError("invalid padding length byte") if verify_padding and s[-padlen:] != (padlen * chr(padlen).encode()): raise ValueError("invalid padding data") return s[:-padlen]
(s, verify_padding=False)
[ -0.01384985912591219, 0.06393073499202728, 0.04078463837504387, 0.040208686143159866, -0.044204358011484146, -0.022354157641530037, 0.00603850232437253, 0.01238297950476408, 0.043916381895542145, -0.003784188302233815, 0.012823943048715591, 0.03236133232712746, 0.025287916883826256, 0.0552...
729,306
tinytuya.core
decrypt
null
def decrypt(self, enc, use_base64=True, decode_text=True, verify_padding=False, iv=False, header=None, tag=None): if not iv: if use_base64: enc = base64.b64decode(enc) if len(enc) % 16 != 0: raise ValueError("invalid length") if iv: iv, enc = self.get_decryption_i...
(self, enc, use_base64=True, decode_text=True, verify_padding=False, iv=False, header=None, tag=None)
[ 0.10207537561655045, -0.016463477164506912, 0.047979794442653656, 0.06046618893742561, -0.006361509207636118, -0.06297802925109863, -0.0052375514060258865, 0.009455805644392967, 0.04626883193850517, 0.015526087023317814, 0.008154381066560745, 0.006548076868057251, 0.004027135670185089, 0.0...
729,307
tinytuya.core
encrypt
null
def encrypt(self, raw, use_base64=True, pad=True, iv=False, header=None): # pylint: disable=W0621 if iv: # initialization vector or nonce (number used once) iv = self.get_encryption_iv( iv ) encryptor = Crypto( AES(self.key), Crypto_modes.GCM(iv) ).encryptor() if header: encrypto...
(self, raw, use_base64=True, pad=True, iv=False, header=None)
[ 0.002405722625553608, -0.05762840434908867, 0.008429107256233692, 0.053779248148202896, 0.04255859553813934, -0.06899430602788925, -0.029304424300789833, 0.005083790980279446, 0.07640212029218674, -0.00780725060030818, 0.037184301763772964, -0.03153765946626663, -0.0016284018056467175, 0.0...
729,308
tinytuya.BulbDevice
BulbDevice
Represents a Tuya based Smart Light/Bulb. This class supports two types of bulbs with different DPS mappings and functions: Type A - Uses DPS index 1-5 Type B - Uses DPS index 20-27 (no index 1) Type C - Same as Type A except that it is using DPS 2 for brightness, which ranges from 0-1...
class BulbDevice(Device): """ Represents a Tuya based Smart Light/Bulb. This class supports two types of bulbs with different DPS mappings and functions: Type A - Uses DPS index 1-5 Type B - Uses DPS index 20-27 (no index 1) Type C - Same as Type A except that it is using DPS 2 for ...
(*args, **kwargs)
[ 0.011186355724930763, -0.10460297763347626, -0.0993686094880104, -0.008405596017837524, -0.014922176487743855, -0.015375962480902672, -0.056142840534448624, 0.03583855181932449, -0.0706217810511589, -0.03282034397125244, -0.04295138269662857, 0.035733018070459366, 0.012167800217866898, 0.0...
729,309
tinytuya.core
__del__
null
def __del__(self): # In case we have a lingering socket connection, close it try: if self.socket: # self.socket.shutdown(socket.SHUT_RDWR) self.socket.close() self.socket = None except: pass
(self)
[ -0.005711456760764122, -0.028065631166100502, 0.004130812361836433, 0.0170286875218153, -0.036115892231464386, -0.028745675459504128, -0.0681147500872612, 0.06701197475194931, -0.005490901879966259, 0.003898770082741976, -0.01990509405732155, -0.019390465691685677, 0.0029637084808200598, -...
729,310
tinytuya.BulbDevice
__init__
null
def __init__(self, *args, **kwargs): # set the default version to None so we do not immediately connect and call status() if 'version' not in kwargs or not kwargs['version']: kwargs['version'] = None super(BulbDevice, self).__init__(*args, **kwargs)
(self, *args, **kwargs)
[ 0.0007154006161727011, -0.05737163871526718, -0.03222792595624924, -0.01648911088705063, -0.006163787096738815, -0.040620796382427216, -0.021723750978708267, 0.06379279494285583, 0.0002438741794321686, -0.026591964066028595, -0.04093487188220024, 0.046518489718437195, -0.04951968044042587, ...
729,311
tinytuya.core
__repr__
null
def __repr__(self): # FIXME can do better than this if self.parent: parent = self.parent.id else: parent = None return ("%s( %r, address=%r, local_key=%r, dev_type=%r, connection_timeout=%r, version=%r, persist=%r, cid=%r, parent=%r, children=%r )" % (self.__class__.__name__,...
(self)
[ -0.004450250882655382, -0.020844310522079468, 0.010590707883238792, 0.02988995611667633, 0.039553627371788025, -0.05768237262964249, 0.035452183336019516, -0.0029098696541041136, 0.05513535812497139, -0.07461252063512802, -0.04535932093858719, 0.0029543486889451742, -0.027867326512932777, ...
729,312
tinytuya.core
_check_socket_close
null
def _check_socket_close(self, force=False): if (force or not self.socketPersistent) and self.socket: self.socket.close() self.socket = None
(self, force=False)
[ 0.02388230711221695, 0.003880449803546071, 0.02131376788020134, 0.053411997854709625, -0.0036975902039557695, -0.013999386690557003, -0.03247245401144028, 0.08573135733604431, 0.02585548907518387, -0.0477646142244339, 0.002866217168048024, -0.02966577187180519, 0.027947742491960526, -0.065...
729,313
tinytuya.core
_decode_payload
null
def _decode_payload(self, payload): log.debug("decode payload=%r", payload) cipher = AESCipher(self.local_key) if self.version == 3.4: # 3.4 devices encrypt the version header in addition to the payload try: log.debug("decrypting=%r", payload) payload = cipher.decrypt...
(self, payload)
[ 0.03938887268304825, 0.014703773893415928, -0.06245511770248413, 0.02268308587372303, -0.010307010263204575, -0.03935055434703827, -0.003903444856405258, 0.023985831066966057, -0.0004582955443765968, -0.01885148324072361, 0.02676374278962612, 0.033066727221012115, -0.009904691949486732, -0...
729,314
tinytuya.core
_encode_message
null
def _encode_message( self, msg ): # make sure to use the parent's self.seqno and session key if self.parent: return self.parent._encode_message( msg ) hmac_key = None iv = None payload = msg.payload self.cipher = AESCipher(self.local_key) if self.version >= 3.4: hmac_key = se...
(self, msg)
[ -0.02032090350985527, -0.05241690203547478, -0.030343519523739815, 0.0664367526769638, 0.0010559189831838012, -0.05639444291591644, -0.04832121729850769, 0.061435289680957794, 0.01408876571804285, -0.05411031097173691, 0.04312284663319588, 0.012552883476018906, 0.008117531426250935, 0.0519...
729,315
tinytuya.core
_get_socket
null
def _get_socket(self, renew): if renew and self.socket is not None: # self.socket.shutdown(socket.SHUT_RDWR) self.socket.close() self.socket = None if self.socket is None: # Set up Socket retries = 0 err = ERR_OFFLINE while retries < self.socketRetryLimit:...
(self, renew)
[ 0.027991535142064095, -0.054266516119241714, -0.04322595149278641, 0.03778369352221489, -0.004603485576808453, -0.027367332950234413, -0.05301811173558235, 0.018033569678664207, -0.01237674430012703, -0.05040426924824715, -0.0261189304292202, 0.0018750426825135946, 0.011342911049723625, 0....
729,316
tinytuya.BulbDevice
_hexvalue_to_hsv
Converts the hexvalue used by Tuya for colour representation into an HSV value. Args: hexvalue(string): The hex representation generated by BulbDevice._rgb_to_hexvalue()
@staticmethod def _hexvalue_to_hsv(hexvalue, bulb="A"): """ Converts the hexvalue used by Tuya for colour representation into an HSV value. Args: hexvalue(string): The hex representation generated by BulbDevice._rgb_to_hexvalue() """ if bulb == "A": h = int(hexvalue[7:10], 16) / ...
(hexvalue, bulb='A')
[ -0.014290327206254005, -0.10005958378314972, -0.05854395031929016, -0.037440475076436996, -0.025797178968787193, -0.0030199801549315453, 0.0032269214279949665, 0.07611805200576782, -0.04395344480872154, -0.015718450769782066, 0.03185533359646797, 0.027852948755025864, 0.04056961089372635, ...