neulab/docprompting-conala huggingface dataset:
sklearn.utils.sparsefuncs.inplace_column_scale(X, scale) [source]
 
Inplace column scaling of a CSC/CSR matrix. Scale each feature of the data matrix by multiplying with specific scale provided by the caller assuming a (n_samples, n_features) shape.  Parameters 
 
Xsparse matrix of shape (n_samples, n_features) 

Matrix to normalize using the variance of the features. It should be of CSC or CSR format.  
scalendarray of shape (n_features,), dtype={np.float32, np.float64} 

Array of precomputed feature-wise values to use for scaling.
sklearn.utils.sparsefuncs.inplace_csr_column_scale(X, scale) [source]
 
Inplace column scaling of a CSR matrix. Scale each feature of the data matrix by multiplying with specific scale provided by the caller assuming a (n_samples, n_features) shape.  Parameters 
 
Xsparse matrix of shape (n_samples, n_features) 

Matrix to normalize using the variance of the features. It should be of CSR format.  
scalendarray of shape (n_features,), dtype={np.float32, np.float64} 

Array of precomputed feature-wise values to use for scaling.
sklearn.utils.sparsefuncs.inplace_row_scale(X, scale) [source]
 
Inplace row scaling of a CSR or CSC matrix. Scale each row of the data matrix by multiplying with specific scale provided by the caller assuming a (n_samples, n_features) shape.  Parameters 
 
Xsparse matrix of shape (n_samples, n_features) 

Matrix to be scaled. It should be of CSR or CSC format.  
scalendarray of shape (n_features,), dtype={np.float32, np.float64} 

Array of precomputed sample-wise values to use for scaling.
sklearn.utils.sparsefuncs.inplace_swap_column(X, m, n) [source]
 
Swaps two columns of a CSC/CSR matrix in-place.  Parameters 
 
Xsparse matrix of shape (n_samples, n_features) 

Matrix whose two columns are to be swapped. It should be of CSR or CSC format.  
mint 

Index of the column of X to be swapped.  
nint 

Index of the column of X to be swapped.
sklearn.utils.sparsefuncs.inplace_swap_row(X, m, n) [source]
 
Swaps two rows of a CSC/CSR matrix in-place.  Parameters 
 
Xsparse matrix of shape (n_samples, n_features) 

Matrix whose two rows are to be swapped. It should be of CSR or CSC format.  
mint 

Index of the row of X to be swapped.  
nint 

Index of the row of X to be swapped.
sklearn.utils.sparsefuncs.mean_variance_axis(X, axis, weights=None, return_sum_weights=False) [source]
 
Compute mean and variance along an axis on a CSR or CSC matrix.  Parameters 
 
Xsparse matrix of shape (n_samples, n_features) 

Input data. It can be of CSR or CSC format.  
axis{0, 1} 

Axis along which the axis should be computed.  
weightsndarray of shape (n_samples,) or (n_features,), default=None 

if axis is set to 0 shape is (n_samples,) or if axis is set to 1 shape is (n_features,). If it is set to None, then samples are equally weighted.  New in version 0.24.   
return_sum_weightsbool, default=False 

If True, returns the sum of weights seen for each feature if axis=0 or each sample if axis=1.  New in version 0.24.     Returns 
 
meansndarray of shape (n_features,), dtype=floating 

Feature-wise means.  
variancesndarray of shape (n_features,), dtype=floating 

Feature-wise variances.  
sum_weightsndarray of shape (n_features,), dtype=floating 

Returned if return_sum_weights is True.
sklearn.utils.sparsefuncs_fast.inplace_csr_row_normalize_l1()  
Inplace row normalize using the l1 norm
sklearn.utils.sparsefuncs_fast.inplace_csr_row_normalize_l2()  
Inplace row normalize using the l2 norm
sklearn.utils.validation.check_is_fitted(estimator, attributes=None, *, msg=None, all_or_any=<built-in function all>) [source]
 
Perform is_fitted validation for estimator. Checks if the estimator is fitted by verifying the presence of fitted attributes (ending with a trailing underscore) and otherwise raises a NotFittedError with the given message. This utility is meant to be used internally by estimators themselves, typically in their own predict / transform methods.  Parameters 
 
estimatorestimator instance 

estimator instance for which the check is performed.  
attributesstr, list or tuple of str, default=None 

Attribute name(s) given as string or a list/tuple of strings Eg.: ["coef_", "estimator_", ...], "coef_" If None, estimator is considered fitted if there exist an attribute that ends with a underscore and does not start with double underscore.  
msgstr, default=None 

The default error message is, “This %(name)s instance is not fitted yet. Call ‘fit’ with appropriate arguments before using this estimator.” For custom messages if “%(name)s” is present in the message string, it is substituted for the estimator name. Eg. : “Estimator, %(name)s, must be fitted before sparsifying”.  
all_or_anycallable, {all, any}, default=all 

Specify whether all or any of the given attributes must exist.    Returns 
 None
  Raises 
 NotFittedError

If the attributes are not found.
sklearn.utils.validation.check_memory(memory) [source]
 
Check that memory is joblib.Memory-like. joblib.Memory-like means that memory can be converted into a joblib.Memory instance (typically a str denoting the location) or has the same interface (has a cache method).  Parameters 
 
memoryNone, str or object with the joblib.Memory interface 
  Returns 
 
memoryobject with the joblib.Memory interface 
  Raises 
 ValueError

If memory is not joblib.Memory-like.
sklearn.utils.validation.check_symmetric(array, *, tol=1e-10, raise_warning=True, raise_exception=False) [source]
 
Make sure that array is 2D, square and symmetric. If the array is not symmetric, then a symmetrized version is returned. Optionally, a warning or exception is raised if the matrix is not symmetric.  Parameters 
 
array{ndarray, sparse matrix} 

Input object to check / convert. Must be two-dimensional and square, otherwise a ValueError will be raised.  
tolfloat, default=1e-10 

Absolute tolerance for equivalence of arrays. Default = 1E-10.  
raise_warningbool, default=True 

If True then raise a warning if conversion is required.  
raise_exceptionbool, default=False 

If True then raise an exception if array is not symmetric.    Returns 
 
array_sym{ndarray, sparse matrix} 

Symmetrized version of the input array, i.e. the average of array and array.transpose(). If sparse, then duplicate entries are first summed and zeros are eliminated.
sklearn.utils.validation.column_or_1d(y, *, warn=False) [source]
 
Ravel column or 1d numpy array, else raises an error.  Parameters 
 
yarray-like 

warnbool, default=False 

To control display of warnings.    Returns 
 
yndarray
sklearn.utils.validation.has_fit_parameter(estimator, parameter) [source]
 
Checks whether the estimator’s fit method supports the given parameter.  Parameters 
 
estimatorobject 

An estimator to inspect.  
parameterstr 

The searched parameter.    Returns 
 is_parameter: bool

Whether the parameter was found to be a named parameter of the estimator’s fit method.     Examples >>> from sklearn.svm import SVC
>>> has_fit_parameter(SVC(), "sample_weight")
True
sklearn.utils._safe_indexing(X, indices, *, axis=0) [source]
 
Return rows, items or columns of X using indices.  Warning This utility is documented, but private. This means that backward compatibility might be broken without any deprecation cycle.   Parameters 
 
Xarray-like, sparse-matrix, list, pandas.DataFrame, pandas.Series 

Data from which to sample rows, items or columns. list are only supported when axis=0.  
indicesbool, int, str, slice, array-like 

 If axis=0, boolean and integer array-like, integer slice, and scalar integer are supported. 
 
If axis=1: 

 to select a single column, indices can be of int type for all X types and str only for dataframe. The selected subset will be 1D, unless X is a sparse matrix in which case it will be 2D. to select multiples columns, indices can be one of the following: list, array, slice. The type used in these containers can be one of the following: int, ‘bool’ and str. However, str is only supported when X is a dataframe. The selected subset will be 2D.       
axisint, default=0 

The axis along which X will be subsampled. axis=0 will select rows while axis=1 will select columns.    Returns 
 subset

Subset of X on axis 0 or 1.     Notes CSR, CSC, and LIL sparse matrices are supported. COO sparse matrices are not supported.
pygame._sdl2.touch
  
 pygame module to work with touch input   New in pygame 2: This module requires SDL2.    pygame._sdl2.touch.get_num_devices() 
 get the number of touch devices get_num_devices() -> int  Return the number of available touch devices. 
   pygame._sdl2.touch.get_device() 
 get the a touch device id for a given index get_device(index) -> touchid      
Parameters:

index (int) -- This number is at least 0 and less than the number of devices.    Return an integer id associated with the given index. 
   pygame._sdl2.touch.get_num_fingers() 
 the number of active fingers for a given touch device get_num_fingers(touchid) -> int  Return the number of fingers active for the touch device whose id is touchid. 
   pygame._sdl2.touch.get_finger() 
 get information about an active finger get_finger(touchid, index) -> int      
Parameters:

 
touchid (int) -- The touch device id. 
index (int) -- The index of the finger to return information about, between 0 and the number of active fingers.      Return a dict for the finger index active on touchid. The dict contains these keys: id         the id of the finger (an integer).
x          the normalized x position of the finger, between 0 and 1.
y          the normalized y position of the finger, between 0 and 1.
pressure   the amount of pressure applied by the finger, between 0 and 1.
pygame._sdl2.touch.get_device() 
 get the a touch device id for a given index get_device(index) -> touchid      
Parameters:

index (int) -- This number is at least 0 and less than the number of devices.    Return an integer id associated with the given index.
pygame._sdl2.touch.get_finger() 
 get information about an active finger get_finger(touchid, index) -> int      
Parameters:

 
touchid (int) -- The touch device id. 
index (int) -- The index of the finger to return information about, between 0 and the number of active fingers.      Return a dict for the finger index active on touchid. The dict contains these keys: id         the id of the finger (an integer).
x          the normalized x position of the finger, between 0 and 1.
y          the normalized y position of the finger, between 0 and 1.
pressure   the amount of pressure applied by the finger, between 0 and 1.
pygame._sdl2.touch.get_num_devices() 
 get the number of touch devices get_num_devices() -> int  Return the number of available touch devices.
pygame._sdl2.touch.get_num_fingers() 
 the number of active fingers for a given touch device get_num_fingers(touchid) -> int  Return the number of fingers active for the touch device whose id is touchid.
length 
 The size, in bytes, of the exported buffer. length -> int  The number of valid bytes of data exported. For discontinuous data, that is data which is not a single block of memory, the bytes within the gaps are excluded from the count. This property is equivalent to the Py_buffer C struct len field.
parent 
 Return wrapped exporting object. parent -> Surface parent -> <parent>  The Surface which returned the BufferProxy object or the object passed to a BufferProxy call.
raw 
 A copy of the exported buffer as a single block of bytes. raw -> bytes  The buffer data as a str/bytes object. Any gaps in the exported data are removed.
write() 
 Write raw bytes to object buffer. write(buffer, offset=0)  Overwrite bytes in the parent object's data. The data must be C or F contiguous, otherwise a ValueError is raised. Argument buffer is a str/bytes object. An optional offset gives a start position, in bytes, within the buffer where overwriting begins. If the offset is negative or greater that or equal to the buffer proxy's length value, an IndexException is raised. If len(buffer) > proxy.length + offset, a ValueError is raised.
pygame.camera.Camera 
 load a camera Camera(device, (width, height), format) -> Camera  Loads a v4l2 camera. The device is typically something like "/dev/video0". Default width and height are 640 by 480. Format is the desired colorspace of the output. This is useful for computer vision purposes. The default is RGB. The following are supported:  
 
RGB - Red, Green, Blue 
YUV - Luma, Blue Chrominance, Red Chrominance 
HSV - Hue, Saturation, Value  
   start() 
 opens, initializes, and starts capturing start() -> None  Opens the camera device, attempts to initialize it, and begins recording images to a buffer. The camera must be started before any of the below functions can be used. 
   stop() 
 stops, uninitializes, and closes the camera stop() -> None  Stops recording, uninitializes the camera, and closes it. Once a camera is stopped, the below functions cannot be used until it is started again. 
   get_controls() 
 gets current values of user controls get_controls() -> (hflip = bool, vflip = bool, brightness)  If the camera supports it, get_controls will return the current settings for horizontal and vertical image flip as bools and brightness as an int. If unsupported, it will return the default values of (0, 0, 0). Note that the return values here may be different than those returned by set_controls, though these are more likely to be correct. 
   set_controls() 
 changes camera settings if supported by the camera set_controls(hflip = bool, vflip = bool, brightness) -> (hflip = bool, vflip = bool, brightness)  Allows you to change camera settings if the camera supports it. The return values will be the input values if the camera claims it succeeded or the values previously in use if not. Each argument is optional, and the desired one can be chosen by supplying the keyword, like hflip. Note that the actual settings being used by the camera may not be the same as those returned by set_controls. 
   get_size() 
 returns the dimensions of the images being recorded get_size() -> (width, height)  Returns the current dimensions of the images being captured by the camera. This will return the actual size, which may be different than the one specified during initialization if the camera did not support that size. 
   query_image() 
 checks if a frame is ready query_image() -> bool  If an image is ready to get, it returns true. Otherwise it returns false. Note that some webcams will always return False and will only queue a frame when called with a blocking function like get_image(). This is useful to separate the framerate of the game from that of the camera without having to use threading. 
   get_image() 
 captures an image as a Surface get_image(Surface = None) -> Surface  Pulls an image off of the buffer as an RGB Surface. It can optionally reuse an existing Surface to save time. The bit-depth of the surface is either 24 bits or the same as the optionally supplied Surface. 
   get_raw() 
 returns an unmodified image as a string get_raw() -> string  Gets an image from a camera as a string in the native pixelformat of the camera. Useful for integration with other libraries.
get_controls() 
 gets current values of user controls get_controls() -> (hflip = bool, vflip = bool, brightness)  If the camera supports it, get_controls will return the current settings for horizontal and vertical image flip as bools and brightness as an int. If unsupported, it will return the default values of (0, 0, 0). Note that the return values here may be different than those returned by set_controls, though these are more likely to be correct.
get_image() 
 captures an image as a Surface get_image(Surface = None) -> Surface  Pulls an image off of the buffer as an RGB Surface. It can optionally reuse an existing Surface to save time. The bit-depth of the surface is either 24 bits or the same as the optionally supplied Surface.
get_raw() 
 returns an unmodified image as a string get_raw() -> string  Gets an image from a camera as a string in the native pixelformat of the camera. Useful for integration with other libraries.
get_size() 
 returns the dimensions of the images being recorded get_size() -> (width, height)  Returns the current dimensions of the images being captured by the camera. This will return the actual size, which may be different than the one specified during initialization if the camera did not support that size.
query_image() 
 checks if a frame is ready query_image() -> bool  If an image is ready to get, it returns true. Otherwise it returns false. Note that some webcams will always return False and will only queue a frame when called with a blocking function like get_image(). This is useful to separate the framerate of the game from that of the camera without having to use threading.
set_controls() 
 changes camera settings if supported by the camera set_controls(hflip = bool, vflip = bool, brightness) -> (hflip = bool, vflip = bool, brightness)  Allows you to change camera settings if the camera supports it. The return values will be the input values if the camera claims it succeeded or the values previously in use if not. Each argument is optional, and the desired one can be chosen by supplying the keyword, like hflip. Note that the actual settings being used by the camera may not be the same as those returned by set_controls.
start() 
 opens, initializes, and starts capturing start() -> None  Opens the camera device, attempts to initialize it, and begins recording images to a buffer. The camera must be started before any of the below functions can be used.
stop() 
 stops, uninitializes, and closes the camera stop() -> None  Stops recording, uninitializes the camera, and closes it. Once a camera is stopped, the below functions cannot be used until it is started again.
pygame.camera.colorspace() 
 Surface colorspace conversion colorspace(Surface, format, DestSurface = None) -> Surface  Allows for conversion from "RGB" to a destination colorspace of "HSV" or "YUV". The source and destination surfaces must be the same size and pixel depth. This is useful for computer vision on devices with limited processing power. Capture as small of an image as possible, transform.scale() it even smaller, and then convert the colorspace to YUV or HSV before doing any processing on it.
pygame.camera.list_cameras() 
 returns a list of available cameras list_cameras() -> [cameras]  Checks the computer for available cameras and returns a list of strings of camera names, ready to be fed into pygame.camera.Camera.
eject() 
 eject or open the cdrom drive eject() -> None  This will open the cdrom drive and eject the cdrom. If the drive is playing or paused it will be stopped.
get_all() 
 get all track information get_all() -> [(audio, start, end, length), ...]  Return a list with information for every track on the cdrom. The information consists of a tuple with four values. The audio value is True if the track contains audio data. The start, end, and length values are floating point numbers in seconds. Start and end represent absolute times on the entire disc.
get_busy() 
 true if the drive is playing audio get_busy() -> bool  Returns True if the drive busy playing back audio.
get_current() 
 the current audio playback position get_current() -> track, seconds  Returns both the current track and time of that track. This method works when the drive is either playing or paused. Note, track 0 is the first track on the CD. Track numbers start at zero.
get_empty() 
 False if a cdrom is in the drive get_empty() -> bool  Return False if there is a cdrom currently in the drive. If the drive is empty this will return True.
get_id() 
 the index of the cdrom drive get_id() -> id  Returns the integer id that was used to create the CD instance. This method can work on an uninitialized CD.
get_init() 
 true if this cd device initialized get_init() -> bool  Test if this CDROM device is initialized. This is different than the pygame.cdrom.init() since each drive must also be initialized individually.
get_name() 
 the system name of the cdrom drive get_name() -> name  Return the string name of the drive. This is the system name used to represent the drive. It is often the drive letter or device name. This method can work on an uninitialized CD.
get_numtracks() 
 the number of tracks on the cdrom get_numtracks() -> count  Return the number of tracks on the cdrom in the drive. This will return zero of the drive is empty or has no tracks.
get_paused() 
 true if the drive is paused get_paused() -> bool  Returns True if the drive is currently paused.
get_track_audio() 
 true if the cdrom track has audio data get_track_audio(track) -> bool  Determine if a track on a cdrom contains audio data. You can also call CD.num_tracks() and CD.get_all() to determine more information about the cdrom. Note, track 0 is the first track on the CD. Track numbers start at zero.
get_track_length() 
 length of a cdrom track get_track_length(track) -> seconds  Return a floating point value in seconds of the length of the cdrom track. Note, track 0 is the first track on the CD. Track numbers start at zero.
get_track_start() 
 start time of a cdrom track get_track_start(track) -> seconds  Return the absolute time in seconds where at start of the cdrom track. Note, track 0 is the first track on the CD. Track numbers start at zero.
init() 
 initialize a cdrom drive for use init() -> None  Initialize the cdrom drive for use. The drive must be initialized for most CD methods to work. Even if the rest of pygame has been initialized. There may be a brief pause while the drive is initialized. Avoid CD.init() if the program should not stop for a second or two.
pause() 
 temporarily stop audio playback pause() -> None  Temporarily stop audio playback on the CD. The playback can be resumed at the same point with the CD.resume() method. If the CD is not playing this method does nothing. Note, track 0 is the first track on the CD. Track numbers start at zero.
play() 
 start playing audio play(track, start=None, end=None) -> None  Playback audio from an audio cdrom in the drive. Besides the track number argument, you can also pass a starting and ending time for playback. The start and end time are in seconds, and can limit the section of an audio track played. If you pass a start time but no end, the audio will play to the end of the track. If you pass a start time and 'None' for the end time, the audio will play to the end of the entire disc. See the CD.get_numtracks() and CD.get_track_audio() to find tracks to playback. Note, track 0 is the first track on the CD. Track numbers start at zero.
quit() 
 uninitialize a cdrom drive for use quit() -> None  Uninitialize a drive for use. Call this when your program will not be accessing the drive for awhile.
resume() 
 unpause audio playback resume() -> None  Unpause a paused CD. If the CD is not paused or already playing, this method does nothing.
stop() 
 stop audio playback stop() -> None  Stops playback of audio from the cdrom. This will also lose the current playback position. This method does nothing if the drive isn't already playing audio.
pygame.cdrom.get_count() 
 number of cd drives on the system get_count() -> count  Return the number of cd drives on the system. When you create CD objects you need to pass an integer id that must be lower than this count. The count will be 0 if there are no drives on the system.
pygame.cdrom.get_init() 
 true if the cdrom module is initialized get_init() -> bool  Test if the cdrom module is initialized or not. This is different than the CD.init() since each drive must also be initialized individually.
pygame.cdrom.init() 
 initialize the cdrom module init() -> None  Initialize the cdrom module. This will scan the system for all CD devices. The module must be initialized before any other functions will work. This automatically happens when you call pygame.init(). It is safe to call this function more than once.
pygame.cdrom.quit() 
 uninitialize the cdrom module quit() -> None  Uninitialize the cdrom module. After you call this any existing CD objects will no longer work. It is safe to call this function more than once.
a 
 Gets or sets the alpha value of the Color. a -> int  The alpha value of the Color.
b 
 Gets or sets the blue value of the Color. b -> int  The blue value of the Color.