doc_content stringlengths 1 386k | doc_id stringlengths 5 188 |
|---|---|
__init__(name, ptype=None, callback=None) [source]
Initialize self. See help(type(self)) for accurate signature. | skimage.api.skimage.viewer.widgets#skimage.viewer.widgets.BaseWidget.__init__ |
class skimage.viewer.widgets.Button(name, callback) [source]
Bases: skimage.viewer.widgets.core.BaseWidget Button which calls callback upon click. Parameters
namestr
Name of button.
callbackcallable f()
Function to call when button is clicked.
__init__(name, callback) [source]
Initialize self. See h... | skimage.api.skimage.viewer.widgets#skimage.viewer.widgets.Button |
__init__(name, callback) [source]
Initialize self. See help(type(self)) for accurate signature. | skimage.api.skimage.viewer.widgets#skimage.viewer.widgets.Button.__init__ |
class skimage.viewer.widgets.CheckBox(name, value=False, alignment='center', ptype='kwarg', callback=None) [source]
Bases: skimage.viewer.widgets.core.BaseWidget CheckBox widget Parameters
namestr
Name of CheckBox parameter. If this parameter is passed as a keyword argument, it must match the name of that keywo... | skimage.api.skimage.viewer.widgets#skimage.viewer.widgets.CheckBox |
property val | skimage.api.skimage.viewer.widgets#skimage.viewer.widgets.CheckBox.val |
__init__(name, value=False, alignment='center', ptype='kwarg', callback=None) [source]
Initialize self. See help(type(self)) for accurate signature. | skimage.api.skimage.viewer.widgets#skimage.viewer.widgets.CheckBox.__init__ |
class skimage.viewer.widgets.ComboBox(name, items, ptype='kwarg', callback=None) [source]
Bases: skimage.viewer.widgets.core.BaseWidget ComboBox widget for selecting among a list of choices. Parameters
namestr
Name of ComboBox parameter. If this parameter is passed as a keyword argument, it must match the name ... | skimage.api.skimage.viewer.widgets#skimage.viewer.widgets.ComboBox |
property index | skimage.api.skimage.viewer.widgets#skimage.viewer.widgets.ComboBox.index |
property val | skimage.api.skimage.viewer.widgets#skimage.viewer.widgets.ComboBox.val |
__init__(name, items, ptype='kwarg', callback=None) [source]
Initialize self. See help(type(self)) for accurate signature. | skimage.api.skimage.viewer.widgets#skimage.viewer.widgets.ComboBox.__init__ |
class skimage.viewer.widgets.OKCancelButtons(button_width=80) [source]
Bases: skimage.viewer.widgets.core.BaseWidget Buttons that close the parent plugin. OK will replace the original image with the current (filtered) image. Cancel will just close the plugin.
__init__(button_width=80) [source]
Initialize self. Se... | skimage.api.skimage.viewer.widgets#skimage.viewer.widgets.OKCancelButtons |
close_plugin() [source] | skimage.api.skimage.viewer.widgets#skimage.viewer.widgets.OKCancelButtons.close_plugin |
update_original_image() [source] | skimage.api.skimage.viewer.widgets#skimage.viewer.widgets.OKCancelButtons.update_original_image |
__init__(button_width=80) [source]
Initialize self. See help(type(self)) for accurate signature. | skimage.api.skimage.viewer.widgets#skimage.viewer.widgets.OKCancelButtons.__init__ |
class skimage.viewer.widgets.SaveButtons(name='Save to:', default_format='png') [source]
Bases: skimage.viewer.widgets.core.BaseWidget Buttons to save image to io.stack or to a file.
__init__(name='Save to:', default_format='png') [source]
Initialize self. See help(type(self)) for accurate signature.
save_to_... | skimage.api.skimage.viewer.widgets#skimage.viewer.widgets.SaveButtons |
save_to_file(filename=None) [source] | skimage.api.skimage.viewer.widgets#skimage.viewer.widgets.SaveButtons.save_to_file |
save_to_stack() [source] | skimage.api.skimage.viewer.widgets#skimage.viewer.widgets.SaveButtons.save_to_stack |
__init__(name='Save to:', default_format='png') [source]
Initialize self. See help(type(self)) for accurate signature. | skimage.api.skimage.viewer.widgets#skimage.viewer.widgets.SaveButtons.__init__ |
class skimage.viewer.widgets.Slider(name, low=0.0, high=1.0, value=None, value_type='float', ptype='kwarg', callback=None, max_edit_width=60, orientation='horizontal', update_on='release') [source]
Bases: skimage.viewer.widgets.core.BaseWidget Slider widget for adjusting numeric parameters. Parameters
namestr
N... | skimage.api.skimage.viewer.widgets#skimage.viewer.widgets.Slider |
property val | skimage.api.skimage.viewer.widgets#skimage.viewer.widgets.Slider.val |
__init__(name, low=0.0, high=1.0, value=None, value_type='float', ptype='kwarg', callback=None, max_edit_width=60, orientation='horizontal', update_on='release') [source]
Initialize self. See help(type(self)) for accurate signature. | skimage.api.skimage.viewer.widgets#skimage.viewer.widgets.Slider.__init__ |
class skimage.viewer.widgets.Text(name=None, text='') [source]
Bases: skimage.viewer.widgets.core.BaseWidget
__init__(name=None, text='') [source]
Initialize self. See help(type(self)) for accurate signature.
property text | skimage.api.skimage.viewer.widgets#skimage.viewer.widgets.Text |
property text | skimage.api.skimage.viewer.widgets#skimage.viewer.widgets.Text.text |
__init__(name=None, text='') [source]
Initialize self. See help(type(self)) for accurate signature. | skimage.api.skimage.viewer.widgets#skimage.viewer.widgets.Text.__init__ |
abc — Abstract Base Classes Source code: Lib/abc.py This module provides the infrastructure for defining abstract base classes (ABCs) in Python, as outlined in PEP 3119; see the PEP for why this was added to Python. (See also PEP 3141 and the numbers module regarding a type hierarchy for numbers based on ABCs.) The col... | python.library.abc |
class abc.ABC
A helper class that has ABCMeta as its metaclass. With this class, an abstract base class can be created by simply deriving from ABC avoiding sometimes confusing metaclass usage, for example: from abc import ABC
class MyABC(ABC):
pass
Note that the type of ABC is still ABCMeta, therefore inheritin... | python.library.abc#abc.ABC |
class abc.ABCMeta
Metaclass for defining Abstract Base Classes (ABCs). Use this metaclass to create an ABC. An ABC can be subclassed directly, and then acts as a mix-in class. You can also register unrelated concrete classes (even built-in classes) and unrelated ABCs as “virtual subclasses” – these and their descenda... | python.library.abc#abc.ABCMeta |
register(subclass)
Register subclass as a “virtual subclass” of this ABC. For example: from abc import ABC
class MyABC(ABC):
pass
MyABC.register(tuple)
assert issubclass(tuple, MyABC)
assert isinstance((), MyABC)
Changed in version 3.3: Returns the registered subclass, to allow usage as a class decorator. ... | python.library.abc#abc.ABCMeta.register |
__subclasshook__(subclass)
(Must be defined as a class method.) Check whether subclass is considered a subclass of this ABC. This means that you can customize the behavior of issubclass further without the need to call register() on every class you want to consider a subclass of the ABC. (This class method is called ... | python.library.abc#abc.ABCMeta.__subclasshook__ |
@abc.abstractclassmethod
New in version 3.2. Deprecated since version 3.3: It is now possible to use classmethod with abstractmethod(), making this decorator redundant. A subclass of the built-in classmethod(), indicating an abstract classmethod. Otherwise it is similar to abstractmethod(). This special case is d... | python.library.abc#abc.abstractclassmethod |
@abc.abstractmethod
A decorator indicating abstract methods. Using this decorator requires that the class’s metaclass is ABCMeta or is derived from it. A class that has a metaclass derived from ABCMeta cannot be instantiated unless all of its abstract methods and properties are overridden. The abstract methods can be... | python.library.abc#abc.abstractmethod |
@abc.abstractproperty
Deprecated since version 3.3: It is now possible to use property, property.getter(), property.setter() and property.deleter() with abstractmethod(), making this decorator redundant. A subclass of the built-in property(), indicating an abstract property. This special case is deprecated, as the ... | python.library.abc#abc.abstractproperty |
@abc.abstractstaticmethod
New in version 3.2. Deprecated since version 3.3: It is now possible to use staticmethod with abstractmethod(), making this decorator redundant. A subclass of the built-in staticmethod(), indicating an abstract staticmethod. Otherwise it is similar to abstractmethod(). This special case ... | python.library.abc#abc.abstractstaticmethod |
abc.get_cache_token()
Returns the current abstract base class cache token. The token is an opaque object (that supports equality testing) identifying the current version of the abstract base class cache for virtual subclasses. The token changes with every call to ABCMeta.register() on any ABC. New in version 3.4. | python.library.abc#abc.get_cache_token |
abs(x)
Return the absolute value of a number. The argument may be an integer, a floating point number, or an object implementing __abs__(). If the argument is a complex number, its magnitude is returned. | python.library.functions#abs |
aifc — Read and write AIFF and AIFC files Source code: Lib/aifc.py This module provides support for reading and writing AIFF and AIFF-C files. AIFF is Audio Interchange File Format, a format for storing digital audio samples in a file. AIFF-C is a newer version of the format that includes the ability to compress the au... | python.library.aifc |
aifc.aifc()
Create an AIFF-C file. The default is that an AIFF-C file is created, unless the name of the file ends in '.aiff' in which case the default is an AIFF file. | python.library.aifc#aifc.aifc.aifc |
aifc.aiff()
Create an AIFF file. The default is that an AIFF-C file is created, unless the name of the file ends in '.aiff' in which case the default is an AIFF file. | python.library.aifc#aifc.aifc.aiff |
aifc.close()
Close the AIFF file. After calling this method, the object can no longer be used. | python.library.aifc#aifc.aifc.close |
aifc.getcompname()
Return a bytes array convertible to a human-readable description of the type of compression used in the audio file. For AIFF files, the returned value is b'not compressed'. | python.library.aifc#aifc.aifc.getcompname |
aifc.getcomptype()
Return a bytes array of length 4 describing the type of compression used in the audio file. For AIFF files, the returned value is b'NONE'. | python.library.aifc#aifc.aifc.getcomptype |
aifc.getframerate()
Return the sampling rate (number of audio frames per second). | python.library.aifc#aifc.aifc.getframerate |
aifc.getmark(id)
Return the tuple as described in getmarkers() for the mark with the given id. | python.library.aifc#aifc.aifc.getmark |
aifc.getmarkers()
Return a list of markers in the audio file. A marker consists of a tuple of three elements. The first is the mark ID (an integer), the second is the mark position in frames from the beginning of the data (an integer), the third is the name of the mark (a string). | python.library.aifc#aifc.aifc.getmarkers |
aifc.getnchannels()
Return the number of audio channels (1 for mono, 2 for stereo). | python.library.aifc#aifc.aifc.getnchannels |
aifc.getnframes()
Return the number of audio frames in the file. | python.library.aifc#aifc.aifc.getnframes |
aifc.getparams()
Returns a namedtuple() (nchannels, sampwidth,
framerate, nframes, comptype, compname), equivalent to output of the get*() methods. | python.library.aifc#aifc.aifc.getparams |
aifc.getsampwidth()
Return the size in bytes of individual samples. | python.library.aifc#aifc.aifc.getsampwidth |
aifc.readframes(nframes)
Read and return the next nframes frames from the audio file. The returned data is a string containing for each frame the uncompressed samples of all channels. | python.library.aifc#aifc.aifc.readframes |
aifc.rewind()
Rewind the read pointer. The next readframes() will start from the beginning. | python.library.aifc#aifc.aifc.rewind |
aifc.setcomptype(type, name)
Specify the compression type. If not specified, the audio data will not be compressed. In AIFF files, compression is not possible. The name parameter should be a human-readable description of the compression type as a bytes array, the type parameter should be a bytes array of length 4. Cu... | python.library.aifc#aifc.aifc.setcomptype |
aifc.setframerate(rate)
Specify the sampling frequency in frames per second. | python.library.aifc#aifc.aifc.setframerate |
aifc.setmark(id, pos, name)
Add a mark with the given id (larger than 0), and the given name at the given position. This method can be called at any time before close(). | python.library.aifc#aifc.aifc.setmark |
aifc.setnchannels(nchannels)
Specify the number of channels in the audio file. | python.library.aifc#aifc.aifc.setnchannels |
aifc.setnframes(nframes)
Specify the number of frames that are to be written to the audio file. If this parameter is not set, or not set correctly, the file needs to support seeking. | python.library.aifc#aifc.aifc.setnframes |
aifc.setparams(nchannels, sampwidth, framerate, comptype, compname)
Set all the above parameters at once. The argument is a tuple consisting of the various parameters. This means that it is possible to use the result of a getparams() call as argument to setparams(). | python.library.aifc#aifc.aifc.setparams |
aifc.setpos(pos)
Seek to the specified frame number. | python.library.aifc#aifc.aifc.setpos |
aifc.setsampwidth(width)
Specify the size in bytes of audio samples. | python.library.aifc#aifc.aifc.setsampwidth |
aifc.tell()
Return the current frame number. | python.library.aifc#aifc.aifc.tell |
aifc.writeframes(data)
Write data to the output file. This method can only be called after the audio file parameters have been set. Changed in version 3.4: Any bytes-like object is now accepted. | python.library.aifc#aifc.aifc.writeframes |
aifc.writeframesraw(data)
Like writeframes(), except that the header of the audio file is not updated. Changed in version 3.4: Any bytes-like object is now accepted. | python.library.aifc#aifc.aifc.writeframesraw |
aifc.open(file, mode=None)
Open an AIFF or AIFF-C file and return an object instance with methods that are described below. The argument file is either a string naming a file or a file object. mode must be 'r' or 'rb' when the file must be opened for reading, or 'w' or 'wb' when the file must be opened for writing. I... | python.library.aifc#aifc.open |
all(iterable)
Return True if all elements of the iterable are true (or if the iterable is empty). Equivalent to: def all(iterable):
for element in iterable:
if not element:
return False
return True | python.library.functions#all |
any(iterable)
Return True if any element of the iterable is true. If the iterable is empty, return False. Equivalent to: def any(iterable):
for element in iterable:
if element:
return True
return False | python.library.functions#any |
argparse — Parser for command-line options, arguments and sub-commands New in version 3.2. Source code: Lib/argparse.py Tutorial This page contains the API reference information. For a more gentle introduction to Python command-line parsing, have a look at the argparse tutorial. The argparse module makes it easy to... | python.library.argparse |
class argparse.Action(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None) | python.library.argparse#argparse.Action |
class argparse.RawDescriptionHelpFormatter
class argparse.RawTextHelpFormatter
class argparse.ArgumentDefaultsHelpFormatter
class argparse.MetavarTypeHelpFormatter | python.library.argparse#argparse.ArgumentDefaultsHelpFormatter |
class argparse.ArgumentParser(prog=None, usage=None, description=None, epilog=None, parents=[], formatter_class=argparse.HelpFormatter, prefix_chars='-', fromfile_prefix_chars=None, argument_default=None, conflict_handler='error', add_help=True, allow_abbrev=True, exit_on_error=True)
Create a new ArgumentParser objec... | python.library.argparse#argparse.ArgumentParser |
ArgumentParser.add_argument(name or flags...[, action][, nargs][, const][, default][, type][, choices][, required][, help][, metavar][, dest])
Define how a single command-line argument should be parsed. Each parameter has its own more detailed description below, but in short they are:
name or flags - Either a name ... | python.library.argparse#argparse.ArgumentParser.add_argument |
ArgumentParser.add_argument_group(title=None, description=None)
By default, ArgumentParser groups command-line arguments into “positional arguments” and “optional arguments” when displaying help messages. When there is a better conceptual grouping of arguments than this default one, appropriate groups can be created ... | python.library.argparse#argparse.ArgumentParser.add_argument_group |
ArgumentParser.add_mutually_exclusive_group(required=False)
Create a mutually exclusive group. argparse will make sure that only one of the arguments in the mutually exclusive group was present on the command line: >>> parser = argparse.ArgumentParser(prog='PROG')
>>> group = parser.add_mutually_exclusive_group()
>>>... | python.library.argparse#argparse.ArgumentParser.add_mutually_exclusive_group |
ArgumentParser.add_subparsers([title][, description][, prog][, parser_class][, action][, option_string][, dest][, required][, help][, metavar])
Many programs split up their functionality into a number of sub-commands, for example, the svn program can invoke sub-commands like svn
checkout, svn update, and svn commit. ... | python.library.argparse#argparse.ArgumentParser.add_subparsers |
ArgumentParser.convert_arg_line_to_args(arg_line)
Arguments that are read from a file (see the fromfile_prefix_chars keyword argument to the ArgumentParser constructor) are read one argument per line. convert_arg_line_to_args() can be overridden for fancier reading. This method takes a single argument arg_line which ... | python.library.argparse#argparse.ArgumentParser.convert_arg_line_to_args |
ArgumentParser.error(message)
This method prints a usage message including the message to the standard error and terminates the program with a status code of 2. | python.library.argparse#argparse.ArgumentParser.error |
ArgumentParser.exit(status=0, message=None)
This method terminates the program, exiting with the specified status and, if given, it prints a message before that. The user can override this method to handle these steps differently: class ErrorCatchingArgumentParser(argparse.ArgumentParser):
def exit(self, status=0... | python.library.argparse#argparse.ArgumentParser.exit |
ArgumentParser.format_help()
Return a string containing a help message, including the program usage and information about the arguments registered with the ArgumentParser. | python.library.argparse#argparse.ArgumentParser.format_help |
ArgumentParser.format_usage()
Return a string containing a brief description of how the ArgumentParser should be invoked on the command line. | python.library.argparse#argparse.ArgumentParser.format_usage |
ArgumentParser.get_default(dest)
Get the default value for a namespace attribute, as set by either add_argument() or by set_defaults(): >>> parser = argparse.ArgumentParser()
>>> parser.add_argument('--foo', default='badger')
>>> parser.get_default('foo')
'badger' | python.library.argparse#argparse.ArgumentParser.get_default |
ArgumentParser.parse_args(args=None, namespace=None)
Convert argument strings to objects and assign them as attributes of the namespace. Return the populated namespace. Previous calls to add_argument() determine exactly what objects are created and how they are assigned. See the documentation for add_argument() for d... | python.library.argparse#argparse.ArgumentParser.parse_args |
ArgumentParser.parse_intermixed_args(args=None, namespace=None) | python.library.argparse#argparse.ArgumentParser.parse_intermixed_args |
ArgumentParser.parse_known_args(args=None, namespace=None) | python.library.argparse#argparse.ArgumentParser.parse_known_args |
ArgumentParser.parse_known_intermixed_args(args=None, namespace=None) | python.library.argparse#argparse.ArgumentParser.parse_known_intermixed_args |
ArgumentParser.print_help(file=None)
Print a help message, including the program usage and information about the arguments registered with the ArgumentParser. If file is None, sys.stdout is assumed. | python.library.argparse#argparse.ArgumentParser.print_help |
ArgumentParser.print_usage(file=None)
Print a brief description of how the ArgumentParser should be invoked on the command line. If file is None, sys.stdout is assumed. | python.library.argparse#argparse.ArgumentParser.print_usage |
ArgumentParser.set_defaults(**kwargs)
Most of the time, the attributes of the object returned by parse_args() will be fully determined by inspecting the command-line arguments and the argument actions. set_defaults() allows some additional attributes that are determined without any inspection of the command line to b... | python.library.argparse#argparse.ArgumentParser.set_defaults |
class argparse.FileType(mode='r', bufsize=-1, encoding=None, errors=None)
The FileType factory creates objects that can be passed to the type argument of ArgumentParser.add_argument(). Arguments that have FileType objects as their type will open command-line arguments as files with the requested modes, buffer sizes, ... | python.library.argparse#argparse.FileType |
class argparse.RawDescriptionHelpFormatter
class argparse.RawTextHelpFormatter
class argparse.ArgumentDefaultsHelpFormatter
class argparse.MetavarTypeHelpFormatter | python.library.argparse#argparse.MetavarTypeHelpFormatter |
class argparse.Namespace
Simple class used by default by parse_args() to create an object holding attributes and return it. | python.library.argparse#argparse.Namespace |
class argparse.RawDescriptionHelpFormatter
class argparse.RawTextHelpFormatter
class argparse.ArgumentDefaultsHelpFormatter
class argparse.MetavarTypeHelpFormatter | python.library.argparse#argparse.RawDescriptionHelpFormatter |
class argparse.RawDescriptionHelpFormatter
class argparse.RawTextHelpFormatter
class argparse.ArgumentDefaultsHelpFormatter
class argparse.MetavarTypeHelpFormatter | python.library.argparse#argparse.RawTextHelpFormatter |
exception ArithmeticError
The base class for those built-in exceptions that are raised for various arithmetic errors: OverflowError, ZeroDivisionError, FloatingPointError. | python.library.exceptions#ArithmeticError |
array — Efficient arrays of numeric values This module defines an object type which can compactly represent an array of basic values: characters, integers, floating point numbers. Arrays are sequence types and behave very much like lists, except that the type of objects stored in them is constrained. The type is specif... | python.library.array |
class array.array(typecode[, initializer])
A new array whose items are restricted by typecode, and initialized from the optional initializer value, which must be a list, a bytes-like object, or iterable over elements of the appropriate type. If given a list or string, the initializer is passed to the new array’s from... | python.library.array#array.array |
array.append(x)
Append a new item with value x to the end of the array. | python.library.array#array.array.append |
array.buffer_info()
Return a tuple (address, length) giving the current memory address and the length in elements of the buffer used to hold array’s contents. The size of the memory buffer in bytes can be computed as array.buffer_info()[1] *
array.itemsize. This is occasionally useful when working with low-level (and... | python.library.array#array.array.buffer_info |
array.byteswap()
“Byteswap” all items of the array. This is only supported for values which are 1, 2, 4, or 8 bytes in size; for other types of values, RuntimeError is raised. It is useful when reading data from a file written on a machine with a different byte order. | python.library.array#array.array.byteswap |
array.count(x)
Return the number of occurrences of x in the array. | python.library.array#array.array.count |
array.extend(iterable)
Append items from iterable to the end of the array. If iterable is another array, it must have exactly the same type code; if not, TypeError will be raised. If iterable is not an array, it must be iterable and its elements must be the right type to be appended to the array. | python.library.array#array.array.extend |
array.frombytes(s)
Appends items from the string, interpreting the string as an array of machine values (as if it had been read from a file using the fromfile() method). New in version 3.2: fromstring() is renamed to frombytes() for clarity. | python.library.array#array.array.frombytes |
array.fromfile(f, n)
Read n items (as machine values) from the file object f and append them to the end of the array. If less than n items are available, EOFError is raised, but the items that were available are still inserted into the array. | python.library.array#array.array.fromfile |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.