content
stringlengths
22
815k
id
int64
0
4.91M
def fscore(mesh1, mesh2, sample_count=100000, tau=1e-04, points1=None, points2=None): """Computes the F-Score at tau between two meshes.""" points1, points2 = get_points(mesh1, mesh2, points1, points2, sample_count) dist12, _ = pointcloud_neighbor_dista...
5,316,200
def jsonp_ize(dep): """Parse dep as :term:`jsonp` (unless it has been modified with ``jsnop=False``). """ return modify(dep) if "/" in dep and type(dep) is str else dep
5,316,201
def is_guid(techfin_tenant): """Validate guid arg Args: tenant (str): techfin tenant id Returns: bool: true if is valid guid value """ c = re.compile('[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}', re.I) res = c.match(techfin_tenant) return res
5,316,202
def register(name: ServiceKey, version: ServiceVersion) -> Callable: """Maps a service with a callable Basically "glues" the implementation to a function node """ key: _ServiceKeyVersionPair = (name, version) if key not in FUNCTION_SERVICES_CATALOG.keys(): raise ValueError( f"N...
5,316,203
def get_pd_metrics(data): """Function for create physical disks metrics files.""" create_dir(LLD_METRICS_PATH) for ctrl, ctrl_value in data.items(): if isinstance(ctrl_value, dict): for ar_key, ar_value in ctrl_value.items(): match = re.search(ARRAY_NAME_PATT, ar_key) ...
5,316,204
def svn_stream_read(*args): """svn_stream_read(svn_stream_t stream, char buffer) -> svn_error_t""" return _core.svn_stream_read(*args)
5,316,205
def dot(): """Blink LEDs for 0.05 seconds.""" show_all(1) time.sleep(0.05) show_all(0) time.sleep(0.2)
5,316,206
def create_pipes(pipes, pipe_assets): """ Creates the pipes. Generates them randomly and appends them to the pipe list. Args: pipes(list): A list containing the pipe rects pipe_assets(list): A list containing the pipe images images (rotated and non-rotated) Returns: pipes(list)...
5,316,207
def shell_short(unordered, ordered): """ Startig at the bottom of the stack: 1 - If the name is in the correct position move to the next 2 - If it is not in the position remove it, move all other names one positions down and got to 1 sort all the removed positions, these nam...
5,316,208
def test_isfloat3(): """ Tests case 3: An integer string can be cast to float """ string = "42" a_float = isfloat(string) assert a_float
5,316,209
def render_latest_entries_links(context, request=None): """ Renders the links to the 5 latest entries. """ qs = NewsEntry.objects.published() context.update({ 'entries': qs[:5] }) return context
5,316,210
def __standard_cand_fun(candidates): """ Convert candidates from the forms accepted by :py:fun:`recommend` into a standard form, a function that takes a user and returns a candidate list. """ if isinstance(candidates, dict): return candidates.get elif candidates is None: retu...
5,316,211
def _update_measures(pattern): """ Updates the cycle time measures of the pattern. """ # Maximum number of observations considered for the measures (to avoid # excessive influence of old observations) nobs = 30 beats = pattern.evidence[o.QRS][-nobs:] obseq = pattern.obs_seq # RR ...
5,316,212
def run_pwsh(code): """ :param code: powershell code to run //TODO 16: add creation flags to make hidden, but still get stdout. """ p = subprocess.run(['powershell', code], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True) return p.stdout.decode()
5,316,213
def diff(obj1, obj2): """Prints a simple human-readable difference between two Python objects.""" result = [] diffAny(obj1, obj2, result) return '\n'.join(result)
5,316,214
def get_static_features( inputs, num_windows, stream_sizes=None, has_dynamic_features=None, streams=None, ): """Get static features from static+dynamic features.""" if stream_sizes is None: stream_sizes = [180, 3, 1, 15] if has_dynamic_features is None: has_dynamic_featur...
5,316,215
def _l4_parameterize_ ( l4 , tree , xvar , yvar , zvar , uvar , cut = '' , first = 0 , last = _large ) : """Parameterize 4D unbinned ddistribuition from TTree in terms of...
5,316,216
def test_sz_two_total_spin_six(): """Compute <psi| S^2 | psi> = 6 with four up and zero down elec. Direct computation shows that if a state has four electrons with n_up = 4 and n_down = 0, then the state must be an <S^2> = 6 eigenstate (given a properly antisymmetrized spatial part). """ nelec ...
5,316,217
def welcome(): """ Welcomes the player, brief intro to the game, and returns hand size as integer ranging from 4 to 9 """ version = '0.1' m01 = "Welcome to the MIT 6.00.1x Wordgame (etherwar's mod)" m02 = "Build " + version m03 = "The Game: " m04 = "First, you must select a word leng...
5,316,218
def look_up_annotation_set(p_load_list, p_type=''): """ Looks up an set of annotations in the database and finds the Ids of nodes containing SWISSPROT proteins linked to by annotations :param p_load_list: list of payloads :param p_type: expected type of payloads :return: list of tags for which ...
5,316,219
def check(): """Do the database check.""" icursor.execute(""" SELECT datname, age(datfrozenxid) FROM pg_database ORDER by age DESC LIMIT 1 """) row = icursor.fetchone() return row
5,316,220
def test_document(site: Site) -> None: """Ensure Document constructs and static types against protocol.""" d = site["d1"] assert "d1" == d.name
5,316,221
def demo_tp(rank, args): """ Main body of the demo of a basic version of tensor parallel by using PyTorch native sharded tensor APIs. """ print(f"Running basic Megatron style TP example on rank {rank}.") setup(rank, args.world_size) # create a sharding plan based on the given world_size. ...
5,316,222
def sample_multi_ellipsoid(key, mu, radii, rotation, unit_cube_constraint=True): """ Sample from a set of overlapping ellipsoids. When unit_cube_constraint=True then during the sampling when a random radius is chosen, the radius is constrained. u(t) = R @ (x + t * n) + c u(t) == 1 1-c = R@x + t...
5,316,223
def auto_dataset(dataset, label) -> pd.DataFrame: """Prepares a dataset object.""" semantics = infer_semantic_from_dataframe(dataset) def extract_by_semantic(semantic): return [k for k, s in semantics.items() if s == semantic and k != label] categorical_features = extract_by_semantic(Semantic.CATEGORICAL...
5,316,224
def chuz_top(input): """ :type input: ndarray :return: """ return K.argmax(input, 1)
5,316,225
def _estimateKronCovariances( phenos, K1r=None, K1c=None, K2r=None, K2c=None, covs=None, Acovs=None, trait_covar_type="freeform", rank=1, lambd=None, verbose=True, init_method="random", old_opt=True, ): """ estimates the background covariance model before test...
5,316,226
def dBrickId(brickId): """Return box id if valid, raise an exception in other case""" if brickId >= 0 and brickId <= 15: return brickId else: raise ValueError( '{} is not a valid Brick Id, Brick Id must be between 0-15'.format( brickId))
5,316,227
def vibrational_density_state(path_to_mass_weighted_hessian: str, eps_o: float = 3e12, nq: int = 2e4): """ Compute the vibrational density of state from hessian matrix :arg path_to_mass_weighted_hessian: str Point to the mass weighted hessian file eps_o: float Th...
5,316,228
def fit_model( input_path: str, model_dir: str, degree: int = 1, alpha: int = 0 ) -> None: """Train, evaluate and save model given model configuration""" print(f"Fitting model with degree={args.degree} and alpha={args.alpha}") # Split datasets into training and testing train_feature, ev...
5,316,229
def hash(text, digest_alg = 'md5'): """ Generates hash with the given text using the specified digest hashing algorithm """ if not isinstance(digest_alg,str): h = digest_alg(text) else: h = hashlib.new(digest_alg) h.update(text) return h.hexdigest()
5,316,230
def box2d_iou(box1, box2): """Compute 2D bounding box IoU. Input: box1: tuple of (xmin,ymin,xmax,ymax) box2: tuple of (xmin,ymin,xmax,ymax) Output: iou: 2D IoU scalar """ return get_iou( {"x1": box1[0], "y1": box1[1], "x2": box1[2], "y2": box1[3]}, {"x1": box...
5,316,231
def mavgen(opts, args): """Generate mavlink message formatters and parsers (C and Python ) using options and args where args are a list of xml files. This function allows python scripts under Windows to control mavgen using the same interface as shell scripts under Unix""" xml = [] # Enable va...
5,316,232
def merge_params(params, config): """Merge CLI params with configuration file params. Configuration params will overwrite the CLI params. """ return {**params, **config}
5,316,233
def init_rate(): """ This rate indicates the recorded positions' intervals. """ rate = float(0.1) # (Hz) return rate
5,316,234
def doge_response(event, context): """ Background Cloud Function to be triggered by Pub/Sub. Takes the image URL passed in a Slack request and dogeifies it by overlaying text generated by Cloud Vision. Args: event (dict): The data associated with the Pub/Sub event. context (google.cloud....
5,316,235
def get_gamma(y1, y2, gamma1, gamma2): """一般部位及び大部分がガラスで構成されていないドア等の開口部における日除けの効果係数 (-) Args: y1(float): 日除け下端から一般部及び大部分がガラスで構成されていないドア等の開口部の上端までの垂直方向距離 (mm) y2(float): 一般部及び大部分がガラスで構成されていないドア等の開口部の高さ寸法 (mm) gamma1(float): データ「日除けの効果係数」より算出した値 gamma2(float): データ「日除けの効果係数」より算出した値 Re...
5,316,236
def show(files, repo): """Show the commit dialog. Args: files: files for pre-populating the dialog. repo: the repository. Returns: The commit msg. """ if IS_PY2: # wb because we use pprint to write cf = io.open(_commit_file(repo), mode='wb') else: cf = io.open(_commit_file(repo), m...
5,316,237
def download_clip_wrapper(row, output_filename): """Wrapper for parallel processing purposes. label_to_dir""" #print(row, type(row)) #print(output_filename) downloaded, log = download_clip(row['video-id'], output_filename, row['start-time'], row['end-time']) status = tuple([str(downloaded), out...
5,316,238
def add_logo(project, output_dir): """Copy the logo, if any, to images/logo.png .""" if(project.logo_file is None or project.logo_file == ""): return images_path = os.path.join(output_dir, "images") os.makedirs(images_path, exist_ok=True) shutil.copy(project.logo_file, os.path.join(images_pa...
5,316,239
def staff_user_id(): """Creates a staff user and returns its ID.""" staff = factories.UserStaff() return staff.pk
5,316,240
def test_parse_clusters(): """CD-HIT: parse clusters""" clusters = list() with open('testdata/misc/hymhub-head.clstr', 'r') as infile: for clusterid, clusterseqs in parse_clusters(infile): clusters.append(clusterseqs) assert len(clusters) == 3 assert len(clusters[0]) == 1 a...
5,316,241
def save_xps(xps, save_as, nDir=100): """Save `xps` (list of `xp`s) in `nDir` subfolders: `save_as/i`. Example ------- Rename attr. `n_iter` to `nIter` in some saved data: ```py proj_name = "Stein" dd = rc.dirs.data / proj_name save_as = dd / "run_2020-09-22__19:36:13" for save_as...
5,316,242
def debugrebuildfncache(ui, repo): """rebuild the fncache file""" repair.rebuildfncache(ui, repo)
5,316,243
def _darknet_warn_not_used(attr, op='nnvm'): """Raise warning if any operation not supported.""" import warnings err = "{} is ignored in {}.".format(attr, op) warnings.warn(err)
5,316,244
def shift_combine(images, offsets, stat='mean', extend=False): """ Statistics on image stack each being offset by some xy-distance Parameters ---------- images offsets stat extend Returns ------- """ # convert to (masked) array images = np.asanyarray(images) of...
5,316,245
def vertical(y = 0): """Move the cursor to row `y`.""" _write(_constants.CSI + str(y) + 'd')
5,316,246
def convert_tensorflow(frozen_graph_def, name=None, input_names=None, output_names=None, doc_string='', target_opset=None, channel_first_inputs=None, debug_mode=False, custom_op_conversions=None): """ ...
5,316,247
def isNumber(s): """returns True if string s can be cast to a number, False otherwise""" try: float(s) return True except ValueError: return False
5,316,248
def main(): """Trains, evaluates and stores two model2. To test the model during training, use `store_intermediate=True` flag as in following example: ```python # start training from one script: # ... # model = train_and_eval.train_model1(verbose=True, ...
5,316,249
def tasks(tmpdir): """ Set up a project with some tasks that we can test displaying """ task_l = [ "", " ^ this is the first task (released)", " and it has a second line", " > this is the second task (committed)", " . this is the third task (changed, not yet com...
5,316,250
def docker_compose_idle_updates(request): """ :type request: _pytest.python.FixtureRequest """ print("Started preparing test environment...", flush=True) # Options must be given as long form options = common_options options["--project-name"] = "idle" options["--file"] = ["compose/docker...
5,316,251
def user_login(username, password): """ 用户登录api(手机登录) Args: username: 用户账号,手机号 password: 密码 Returns: result: a json obj of user data """ base_url = 'https://music.163.com/weapi/login/cellphone' login_url = 'https://music.163.com/weapi/login/' password = hashlib.m...
5,316,252
def get_input_source_directory(config): """ Given a configuration object, returns the directory of the input file(s). """ options = config.commandline if options.multilocus: # multilocus dataset: assume directory is given as input source return os.path.abspath(options.input) else...
5,316,253
def run_check(test_file, tree_model_file, feature_num_file): """ Args: test_file:file to test performance tree_model_file:gbdt model filt feature_num_file:file to store feature num """ test_feature, test_label = get_test_data(test_file, feature_num_file) tree_model = xgb.Boos...
5,316,254
def validate_search_string(cls, value): """Strip search_field for evil chars used in XSS/SQL injection.""" return escape(value, quote=True) if value is not None else value
5,316,255
def get_topo(logbook): """Return a network for the experiment and the loss function for training.""" # create the network net_config = logbook.config['indiv']['net'] if net_config['class'] not in logbook.module.__dict__: raise ValueError('Network topology {} is not defined for problem {}'.format...
5,316,256
def contact_length(roll_pass: RollPass, roll: Roll): """ Contact length between rolls and stock calculated using Siebel's approach """ height_change = roll_pass.in_profile.height - roll_pass.height return np.sqrt(roll.min_radius * height_change - height_change ** 2 / 4)
5,316,257
def swagger_url(self): """Patch for HTTPS""" return url_for(self.endpoint('specs'), _external=True, _scheme='https')
5,316,258
def read_matrix_as_image(path): """Read every channel of a fusion npy matrix. Args path: Path to the image. """ image = np.load(path) #img = np.zeros((image.shape[0], image.shape[1],6)) #img[:,:,:5] = image #return img[:, :, ::-1].copy() return image[:, :, ::-1].copy()
5,316,259
def home(request): """Mock home view""" return HttpResponse('home')
5,316,260
async def async_setup(hass: HomeAssistant, config: dict): """Set up the bpost component.""" hass.data.setdefault(DOMAIN, {}) return True
5,316,261
def train_svm_classifier(dataset_dir, output_file, n_jobs=1): """ Train an SVM model from the given dataset and save it to a file. """ # Create the classifier classifier = SVMClassifier(dataset_path=dataset_dir, verbose=True, n_jobs=n_jobs, autoscale_size=50) # Tr...
5,316,262
def test_simulator_teardown_equals_quoted(): """run_and_pytest() parses quoted --teardown="TEXT" argument.""" command = ( 'phmdoctest doc/setup.md -uFIRST --teardown="not emptied"' " --report --outfile discarded.py" ) simulator_status = phmdoctest.simulator.run_and_pytest( well_f...
5,316,263
def merge_subgroups(subgroup_list: List[Subgroup]) -> List[Subgroup]: """Post-processing the clusters by merging long names with short sub-name. For example, `male canadian lynx` is merged with `canadian lynx`""" if len(subgroup_list) <= 1: return subgroup_list # sort the subgroup with increas...
5,316,264
def singer_map(pop, rate): """ Define the equation for the singer map. Arguments --------- pop: float current population value at time t rate: float growth rate parameter values Returns ------- float scalar result of singer map at time t+1 """ return...
5,316,265
def initialize_embedding_from_dict(vector_map, dim, vocabulary, zero_init=False, standardize=False): """ Initialize a numpy matrix from pre-exi\sting vectors with indices corresponding to a given vocabulary. Words in vocabulary not in vectors are initialized using a given function. :param vector_map: di...
5,316,266
def setup_kfolds( data_dict, ordered_chrom_keys, num_examples_per_file, k): """given k, split the files as equally as possible across k """ # set up kfolds dict kfolds = {} examples_per_fold = {} for k_idx in xrange(k): kfolds[k_idx] = [[], [], []] ...
5,316,267
def get_wall_status_data_by_simplified_calculation_no_01() -> pd.DataFrame: """ 通気層を有する壁体の総当たりパラメータを取得し、簡易計算法案No.1(簡易版の行列式)による計算結果を保有するDataFrameを作成する :param: なし :return: DataFrame """ # パラメータの総当たりリストを作成する parameter_name = ['theta_e', 'theta_r', 'j_surf', 'a_surf', 'C_1', 'C_2', 'l_h', 'l_w...
5,316,268
def test_add_trcvr_bad_number_of_freqs(): """Test error is raised if number of frequencies does not match input trcvr.""" testfile = os.path.join(UVDATA_PATH, "test_redundant_array.uvfits") uvd = UVData() uvd.read(testfile) dspec_object = DelaySpectrum(uv=uvd) bad_temp = np.ones((1, 51)) * units...
5,316,269
async def online_start(sio, token_id, socket_id=None): """ Start / update online session of the user """ # TODO: save user data cache in db.sockets user = get_user(token_id) # Send socket about all online users to the user # TODO: Full info for all / auth / only for admins if socket_id: ...
5,316,270
def nc_auth(packet, msg, credentials): """NetConnection style authentication.""" packet.channel.channel_set.checkCredentials( credentials['userid'], credentials['password']) # Flag indicating packet was # authenticated properly. packet._authenticated = True
5,316,271
def get_audio_embedding(audio, sr, model=None, input_repr="mel256", content_type="music", embedding_size=6144, center=True, hop_size=0.1, batch_size=32, verbose=True): """ Computes and returns L3 embedding for given audio data. Embeddi...
5,316,272
def main(input_filepath: str, output_filepath: str): """Runs data processing scripts to turn raw data from (../raw) into cleaned data ready to be analyzed (saved in ../processed). """ logger = logging.getLogger(__name__) logger.info("making final data set from raw data by normalizing") train = ...
5,316,273
def format_rpc_response(data, exception=None): """ Formats a response from a RPC Manager. It provides the data and/or a serialized exception so it can be re-created by the caller. :param Any data: A JSON Serializable object. :param Exception exception: An Exception object :return str: JSON ...
5,316,274
def AbsoluteError(U, Uold): """Return absolute error. Absolute error is calculated to track the changes or deviation in the numerical solution. This is done by subtracting the solution obtained at the current time step from the solution at previous time step within the entire domain. T...
5,316,275
def test_detect_encoding(path): """It should detect the proper encoding""" assert detect_encoding(path('latin_1.csv')) == 'ISO-8859-1'
5,316,276
def main(): """ main [Main Function] """ print("**** Start of Transmission ****") windowSize, dataBits, Timeout = InputFunc() GBN(windowSize, dataBits, Timeout)
5,316,277
def scene_filename(): """Construct a safe scene filename, using 'untitled' instead of ''""" filename = os.path.splitext(os.path.basename(bpy.data.filepath))[0] if filename == '': filename = 'untitled' return bpy.path.clean_name(filename)
5,316,278
def init(): """Create a new cycle and return its identifier.""" idf = datetime.now().strftime(idffmt) os.mkdir(directory(idf)) return idf
5,316,279
def conf(conf_name: str) -> Any: """Gets some conf value, can contain '/' which will be interpreted as sub dictionaries""" ...
5,316,280
def convsub_photometry_to_ismphot_database(convsubfits, convsubphot, photreftype, subtracttype, kernelspec, ...
5,316,281
def test_check_shaping_collides(): """ Check that we can test for colliding glyphs in output. """ check = CheckTester(universal_profile, "com.google.fonts/check/shaping/collides") shaping_test = { "configuration": {"collidoscope": {"area": 0, ...
5,316,282
def safe_redirect(endpoint: str, **params: str | bool | None) -> typing.RouteReturn | None: """Redirect to a specific page, except if we are already here. Avoids infinite redirection loops caused by redirecting to the current request endpoint. It also automatically add the following ...
5,316,283
def parse_xml_report(xml_text): """Parse XML report text generated by CodeNarc. :param xml_text: Raw XML text of CodeNarc report. :return: 0 on success, 1 if any violations were found """ logging.debug("Parsing report XML") xml_doc = ElementTree.fromstring(xml_text) package_summary = xml_d...
5,316,284
def interpolate_with_ot(p0, p1, tmap, interp_frac, size): """ Interpolate between p0 and p1 at fraction t_interpolate knowing a transport map from p0 to p1 Parameters ---------- p0 : 2-D array The genes of each cell in the source population p1 : 2-D array The genes of each cell i...
5,316,285
def db_session(func) -> Session: """ gets a connection from the pool, create an orm session and passes it as first parameter to `func` after finish the connection is returned to the pool no transaction handling """ @functools.wraps(func) def _wrapper(*args, **kwargs): with Session(D...
5,316,286
def get_attention(preds, temp): """ preds: Bs*C*W*H """ N, C, H, W = preds.shape value = torch.abs(preds) # Bs*W*H fea_map = value.mean(axis=1, keepdim=True) print("fea_map = ", fea_map.shape) S_attention = ( H * W * F.softmax((fea_map/temp).view(N, -1), dim=1)).view(N, H, W) #...
5,316,287
def select_best_haplotype_match(all_matches): """Returns the best HaplotypeMatch among all_matches. The best matching HaplotypeMatch is the one with the lowest match_metrics score. Args: all_matches: iterable[HaplotypeMatch]. An iterable of HaplotypeMatch objects we want to select the best match fro...
5,316,288
def get_tokens_list_from_column_list(column_name_list: list, delimiter: str = '!!') -> list: """Function that returns list of tokens present in the list of column names. Args: column_name_list: The list of column name strings. delimiter: delimiter seperating tok...
5,316,289
def solve(task: str, preamble_length=25) -> int: """What is the first invalid number?""" data = [int(num) for num in task.strip().split("\n")] return first_invalid(data, preamble_length)
5,316,290
def schedule(course_list): """ Given a list of courses, return a dictionary of the possible schedules ['BT 353','CS 135','HHS 468','BT 181','CS 146','CS 284'] --> {1: {'url': 'https://web.stevens.edu/scheduler/#2015F=10063,10486,10479,11840,12011,11995,10482,10487', 'list': "('BT 181A', ...
5,316,291
def get_repository_instance(conf=None): """ Helper function to get a database Repository model instance based on CLA configuration. :param conf: Same as get_database_models(). :type conf: dict :return: A Repository model instance based on configuration specified. :rtype: cla.models.model_interf...
5,316,292
def update_version(file_path: Path, release: str) -> None: """Update template version in setup.py.""" old_content = file_path.read_text() updated_content = re.sub( r'\nversion = "\d+\.\d+\.\d+"\n', f'\nversion = "{release}"\n', old_content, ) file_path.write_text(updated_cont...
5,316,293
def _setup_RepeatingContainer_special_names(repeating_class): """This function is run when the module is imported--users should not call this function directly. It assigns magic methods and special attribute names to the RepeatingContainer class. This behavior is wrapped in a function to help keep the ...
5,316,294
def set_up_nircam(): """ Return a configured instance of the NIRCam simulator on JWST. Sets up the Lyot stop and filter from the configfile, turns of science instrument (SI) internal WFE and zeros the OTE. :return: Tuple of NIRCam instance, and its OTE """ nircam = webbpsf.NIRCam() nir...
5,316,295
def _dens0(S,T): """Density of seawater at zero pressure""" # --- Define constants --- a0 = 999.842594 a1 = 6.793952e-2 a2 = -9.095290e-3 a3 = 1.001685e-4 a4 = -1.120083e-6 a5 = 6.536332e-9 b0 = 8.24493e-1 b1 = -4.0899e-3 b2 = 7.6438e-5 b3 = -8.2467e-7 ...
5,316,296
def cli_documents_upload(ctx, project_id, input): """Creates user using provided args :param ctx: context :param project_id: project id :param input: input path :return: None """ config = ctx.obj['CONFIG'] tf = TextFlow(config) with tf.app_context(): db.create_all() ...
5,316,297
def parse_log_level(x): """Identify log level in config file""" return { 'DEBUG': logging.DEBUG, 'INFO': logging.INFO, 'WARNING': logging.WARNING, 'ERROR': logging.ERROR, 'CRITICAL': logging.CRITICAL }.get(x, None)
5,316,298
def convolve(array, kernel, boundary='fill', fill_value=0., nan_treatment='interpolate', normalize_kernel=True, mask=None, preserve_nan=False, normalization_zero_tol=1e-8): """ Convolve an array with a kernel. This routine differs from `scipy.ndimage.convolve` because it inclu...
5,316,299