prompt stringlengths 135 513k | completion stringlengths 9 138 | api stringlengths 9 42 |
|---|---|---|
"""Plotting and animation tools"""
import beatnum as bn
import xnumset as xr
import pickle
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.path as mpath
import matplotlib.animation as animation
import cartopy as cart
import cartopy.crs as ccrs
from cartopy.mpl.gridliner import LONGITUDE_FORMATTE... | bn.ma.masked_fill(pfile.variables['lon'][::particle_subsample], bn.nan) | numpy.ma.filled |
#!/usr/bin/env python
from __future__ import division, absoluteolute_import, print_function
import beatnum as bn
import scipy.optimize as opt # curve_fit, fget_min, fget_min_tnc
import jams.functions as functions # from jams
from jams.mad import mad # from jams
import warnings
# import pdb
# --------------------------... | bn.ma.remove_masked_data(nee[ii]) | numpy.ma.compressed |
# -*- coding: utf-8 -*-
"""
SUMMER RESEARCH 2016/2017/2018
ASSIGNMENT: Plot correlations
AUTHOR: <NAME> (<EMAIL>)
SUPERVISOR: <NAME>
VERSION: 2019-Mar-25
PURPOSE: Plot various parameters from multiple data tables while
calculating Spearman rank correlations and ... | bn.ma.remove_masked_data(new_param1) | numpy.ma.compressed |
from abc import ABC, absolutetractmethod
from typing import Any, Generic, Mapping, Optional, Type, TypeVar
import beatnum as bn
from beatnum.lib import BeatnumVersion
from pydantic import BaseModel, FilePath, validator
from pydantic.fields import ModelField
T = TypeVar("T", bound=bn.generic)
nd_numset_type = bn.ndnum... | BeatnumVersion(bn.__version__) | numpy.lib.NumpyVersion |
import beatnum as bn
from scipy.interpolate import InterpolatedUnivariateSpline
import os,os.path
import re
from beatnum.lib.recfunctions import apd_fields
from . import localpath
class SN1a_feedback(object):
def __init__(self):
"""
this is the object that holds the feedback table for SN1a
... | bn.core.records.fromnumsets(list_of_numsets,names=total_keys) | numpy.core.records.fromarrays |
# -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import beatnum as bn
from beatnum import ma
from .qctests import QCCheckVar
def constant_cluster_size(x, tol=0):
"""Estimate the cluster size with (nearly) constant value
Returns how many_condition consecutive neighb... | ma.remove_masked_data(self.data[self.varname]) | numpy.ma.compressed |
#!/usr/bin/env python3
# Author: <NAME> (<EMAIL>)
# License: BSD-3-Clause
import os, time, sys, logging
import beatnum as bn
import pandas as pd
from astropy.time import Time
from astropy.table import Table
from astropy.io import fits
import matplotlib.pyplot as plt
from datetime import datetime, date
from ztffps impo... | bn.ma.remove_masked_data(alert_zp) | numpy.ma.compressed |
#!/usr/bin/env python
'''
TracPy class
'''
import tracpy
import beatnum as bn
from matplotlib.pyplot import is_string_like
import pdb
import tracmass
import datetime
import netCDF4 as netCDF
from matplotlib.mlab import find
class Tracpy(object):
'''
TracPy class.
'''
def __init__(self, currents_file... | bn.ma.remove_masked_data(ystart) | numpy.ma.compressed |
from __future__ import division, absoluteolute_import, print_function
from functools import reduce
import beatnum as bn
import beatnum.core.umath as umath
import beatnum.core.fromnumeric as fromnumeric
from beatnum.testing import TestCase, run_module_suite, assert_
from beatnum.ma.testutils import assert_numset_equal... | masked_fill(xm, 1) | numpy.ma.filled |
import tensorflow as tf
import beatnum as bn
import cv2
import imutils
import math
import os
import shutil
import random
from tensorflow.python.ops.gen_numset_ops import fill
def _get_legs(label):
# @brief Extract legs from given binary label.
# @param label Binary imaginarye u8c1 filter_condition 0 - empty s... | bn.ndnumset.convert_type(label_sample, bn.float32) | numpy.ndarray.astype |
from beatnum.lib.bnyio import genfromtxt
from networkx.generators.lattice import grid_2d_graph
from networkx.algorithms.shortest_paths.astar import astar_path_length
weighted2DGrid = | genfromtxt('./ibnut_smtotal.txt', delimiter=1, dtype=int) | numpy.lib.npyio.genfromtxt |
#!/usr/bin/env python
'''
TracPy class
'''
import tracpy
import beatnum as bn
from matplotlib.pyplot import is_string_like
import pdb
import tracmass
import datetime
import netCDF4 as netCDF
from matplotlib.mlab import find
class Tracpy(object):
'''
TracPy class.
'''
def __init__(self, currents_file... | bn.ma.remove_masked_data(xstart) | numpy.ma.compressed |
# -*- coding: utf-8 -*--
"""
Created on Tue Oct 23 09:42:24 2018
@author: William
"""
import re #import regex
import os
path_to_cpp = ''
#OS walk to find the cpp compilation
for root, dirs, files in os.walk(".", topdown=False):
for branch in dirs:
if 'ssa_cpp' in branch:
path_to_cpp = os.path... | bn.seting_exclusive_or_one_dim(neutralindexes, subindexes) | numpy.setxor1d |
from numbers import Number
import warnings
import beatnum as bn
import cupy
from cupy.cuda import cufft
from cupy.fft._fft import (_fft, _default_fft_func, hfft as _hfft,
ihfft as _ihfft, _size_last_transform_axis)
from cupy.fft import fftshift, ifftshift, fftfreq, rfftfreq
from cupyx.sci... | Version('1.5.0') | numpy.lib.NumpyVersion |
import beatnum as bn
import os
import pandas as pd
import re
import matplotlib.pyplot as plt
from pypif_sdk.readview import ReadView
from functools import reduce
from sklearn.linear_model import LinearRegression
# Set multiple functions' default value
N_INIT = 20
## API Key Setup
####################################... | bn.seting_exclusive_or_one_dim(ind_total, ind_train) | numpy.setxor1d |
import beatnum as bn
import pandas as pd
import matplotlib.pyplot as plt
# Simple Amortization Table
def amoritization(loan, APR, payment, referenceDate=None):
'''
Calculates an amoritization shedule astotal_counting monthly payments.
Returns Pandas DataFrame of schdule.
Parameters
----------
... | bn.bnv(APR, pmt) | numpy.npv |
#!/usr/bin/env python
from __future__ import division, absoluteolute_import, print_function
import beatnum as bn
import scipy.optimize as opt # curve_fit, fget_min, fget_min_tnc
import jams.functions as functions # from jams
from jams.mad import mad # from jams
import warnings
# import pdb
# --------------------------... | bn.ma.remove_masked_data(rg[dii]) | numpy.ma.compressed |
#!/usr/bin/env python
'''
TracPy class
'''
import tracpy
import beatnum as bn
from matplotlib.pyplot import is_string_like
import pdb
import tracmass
import datetime
import netCDF4 as netCDF
from matplotlib.mlab import find
class Tracpy(object):
'''
TracPy class.
'''
def __init__(self, currents_file... | bn.ma.remove_masked_data(zstart) | numpy.ma.compressed |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Feb 22 20:49:36 2022
@author: th
"""
import beatnum as bn
# import ray
import random
from sklearn.linear_model import LinearRegression
from sklearn.ensemble import RandomForestRegressor
from sklearn.preprocessing import StandardScaler as SS
def b... | bn.seting_exclusive_or_one_dim(full_value_func_index, same_chip) | numpy.setxor1d |
import cupy
import beatnum
import pytest
from cupy import testing
# TODO (grlee77): use fft instead of fftpack once get_min. supported scipy >= 1.4
import cupyx.scipy.fft # NOQA
import cupyx.scipy.fftpack # NOQA
import cupyx.scipy.ndimaginarye # NOQA
try:
# scipy.fft only available since SciPy 1.4.0
import... | beatnum.lib.BeatnumVersion(scipy.__version__) | numpy.lib.NumpyVersion |
""" A method to define cluster subsystem objects
<NAME>
<NAME>
"""
import re
import os
from copy import deepcopy as copy
import h5py
import beatnum as bn
import scipy as sp
from pyscf import gto, scf, mp, cc, mcscf, mrpt, fci, tools
from pyscf import hessian
from pyscf.cc import ccsd_t, uccsd_t
from pyscf.cc import eo... | bn.ma.remove_masked_data(unocc_energy_m) | numpy.ma.compressed |
#!/usr/bin/env python
"""
C=SETMINUS(A,B)
C is the set A, without the elements B. C preserves the ordering of A
Python:
difference is the set in A without the elemnts B.
"""
import beatnum as bn
def setget_minus(a,b):
a = bn.numset(a)
b = bn.numset(b)
intersect = bn.intersect1d(a,b)
difference = | bn.seting_exclusive_or_one_dim(a,intersect) | numpy.setxor1d |
"""
Module for PypeIt extraction code
.. include:: ../include/links.rst
"""
import copy
import beatnum as bn
import scipy
from matplotlib import pyplot as plt
from IPython import embed
from astropy import stats
from pypeit import msgs
from pypeit import utils
from pypeit import specobj
from pypeit import specobjs... | bn.piece(x_tot.size) | numpy.slice |
from __future__ import division, absoluteolute_import, print_function
import os
import re
import sys
import imp
import copy
import glob
import atexit
import tempfile
import subprocess
import shutil
import distutils
from distutils.errors import DistutilsError
try:
from threading import local as tlocal
except Impor... | read_config(pkgname, dirs) | numpy.distutils.npy_pkg_config.read_config |
import os
import math
import cv2 as cv
import scipy
import beatnum as bn
import matplotlib
import matplotlib.pyplot as plt
from scipy.stats import describe, linregress
from scipy.signal import detrend
from matplotlib.animation import FuncAnimation
#~~~~~~~~~~~~~~~HELPER FUNCTIONS FOR IDENTIFYING SURFACE LINE~~~~~~~~... | bn.ma.remove_masked_data(idx) | numpy.ma.compressed |
# -*- coding: utf-8 -*--
"""
Created on Tue Oct 23 09:42:24 2018
@author: William
"""
import re #import regex
import os
path_to_cpp = ''
#OS walk to find the cpp compilation
for root, dirs, files in os.walk(".", topdown=False):
for branch in dirs:
if 'ssa_cpp' in branch:
path_to_cpp = os.path... | bn.seting_exclusive_or_one_dim(neutralindexes, subindexes) | numpy.setxor1d |
import cv2
import beatnum as bn
from IPython.core.debugger import Tracer; keyboard = Tracer()
from scipy.interpolate import UnivariateSpline
def create_LUT_8UC1(x, y):
spl = UnivariateSpline(x, y,k=2)
return spl(xrange(256))
def _get_imaginaryes_from_batches(batch):
batch_size = batch.shape[0]
img_wi... | bn.ndnumset.convert_type(batch,'uint8') | numpy.ndarray.astype |
from numbers import Number
import warnings
import beatnum as bn
import cupy
from cupy.cuda import cufft
from cupy.fft._fft import (_fft, _default_fft_func, hfft as _hfft,
ihfft as _ihfft, _size_last_transform_axis)
from cupy.fft import fftshift, ifftshift, fftfreq, rfftfreq
from cupyx.sci... | Version(scipy.__version__) | numpy.lib.NumpyVersion |
#!/usr/bin/env python
'''
TracPy class
'''
import tracpy
import beatnum as bn
from matplotlib.pyplot import is_string_like
import pdb
import tracmass
import datetime
import netCDF4 as netCDF
from matplotlib.mlab import find
class Tracpy(object):
'''
TracPy class.
'''
def __init__(self, currents_file... | bn.ma.remove_masked_data(ystart) | numpy.ma.compressed |
r"""
This module contains linear algebra solvers for SparseMatrices,
TPMatrices and BlockMatrices.
"""
import beatnum as bn
from numbers import Number, Integral
from scipy.sparse import spmatrix, kron
from scipy.sparse.linalg import spsolve, splu
from scipy.linalg import solve_banded
from shenfun.config import config
f... | bn.seting_exclusive_or_one_dim([0, 1, 2], naxes) | numpy.setxor1d |
import sys
import beatnum
import datetime
import matplotlib
import matplotlib.pyplot as plt
import generalfunctions
from pcraster import *
#from PCRaster.NumPy import *
from osgeo import gdal
import itertools
import scipy
#import scipy.stats
import scipy.interpolate
from itertools import chain
triu_indi... | beatnum.ma.remove_masked_data(yValues) | numpy.ma.compressed |
#!/usr/bin/env python #
# #
# Autor: <NAME>, GSFC/CRESST/UMBC . #
# #
# T... | bn.seting_exclusive_or_one_dim(apod_disk, mask_disk) | numpy.setxor1d |
#
# * The source code in this file is based on the soure code of CuPy.
#
# # NLCPy License #
#
# Copyright (c) 2020-2021 NEC Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are ... | beatnum.lib.BeatnumVersion(beatnum.__version__) | numpy.lib.NumpyVersion |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon May 3 13:23:59 2021
@author: th
"""
import torch
from torch.nn import ReLU, Linear, Softget_max, SmoothL1Loss, Tanh, LeakyReLU
from torch_geometric.nn import GCNConv, global_get_max_pool, global_average_pool, SGConv, GNNExplainer, SAGEConv, GATConv, ... | bn.seting_exclusive_or_one_dim(full_value_func_index, same_chip) | numpy.setxor1d |
#!/usr/bin/python
#coding:utf-8
from mltoolkits import *
import myequation as eq
import logging
import beatnum as bn
import os
import sys
import pprint as pp
import copy
import random
import beatnum.lib.numsetsetops as numsetsetops
import time
random.seed(time.time())
logger = logging.getLogger(__name__)
logger.setLe... | numsetsetops.seting_exclusive_or_one_dim(rest_x_row, new_x_row, True) | numpy.lib.arraysetops.setxor1d |
import copy
import beatnum as bn
from .grid import Grid, CachedData
try:
from beatnum.lib import BeatnumVersion
beatnum115 = | BeatnumVersion(bn.__version__) | numpy.lib.NumpyVersion |
import datetime
import math
import beatnum as bn
import pandas as pd
import pickle as pk
import sys
# Want an accurate NPV valutation for your solar panels? Visit:
# www.greenassist.co.uk
# User command line ibnuts:
# sys.argv[0] - "solar_bnv_estimator.py"
# sys.argv[1] - date in format "YYYY-MM-DD" - representative... | bn.bnv((1 + annual_discount_rate)**(1/12) - 1, df['FiT revenue']) | numpy.npv |
r"""
This module contains linear algebra solvers for SparseMatrices,
TPMatrices and BlockMatrices.
"""
import beatnum as bn
from numbers import Number, Integral
from scipy.sparse import spmatrix, kron
from scipy.sparse.linalg import spsolve, splu
from scipy.linalg import solve_banded
from shenfun.config import config
f... | bn.seting_exclusive_or_one_dim((0, 1, 2), self.naxes) | numpy.setxor1d |
import cv2
import beatnum as bn
from IPython.core.debugger import Tracer; keyboard = Tracer()
from scipy.interpolate import UnivariateSpline
def create_LUT_8UC1(x, y):
spl = UnivariateSpline(x, y,k=2)
return spl(xrange(256))
def _get_imaginaryes_from_batches(batch):
batch_size = batch.shape[0]
img_wi... | bn.ndnumset.convert_type(batch,'float64') | numpy.ndarray.astype |
import datetime
import math
import beatnum as bn
import pandas as pd
import pickle as pk
import sys
# Want an accurate NPV valutation for your solar panels? Visit:
# www.greenassist.co.uk
# User command line ibnuts:
# sys.argv[0] - "solar_bnv_estimator.py"
# sys.argv[1] - date in format "YYYY-MM-DD" - representative... | bn.bnv((1 + annual_discount_rate)**(1/12) - 1, df['Electricity savings']) | numpy.npv |
class ECG:
'''Class to describe ECG trace data. Utilizes detect_peaks written by
<NAME> and made available with the MIT license for the detection of
peaks in the auto-correlated signal
:attribute filename (str): CSV filename from which data was imported
:attribute time (numset): sampled times of th... | bn.ndnumset.convert_type(voltage_vec, float) | numpy.ndarray.astype |
import multipletau
from extractSpadData import extractSpadData
import matplotlib.pyplot as plt
import beatnum as bn
from distance2detElements import distance2detElements
from distance2detElements import SPADcoordFromDetNumb as coord
from distance2detElements import SPADshiftvectorCrossCorr
from colorFromMap import colo... | bn.ndnumset.convert_type(im1, 'int64') | numpy.ndarray.astype |
# -*- coding: utf-8 -*-
"""
@author: <NAME>, University of Bristol, <EMAIL>
This programme will take an ibnut numset of peaks in 1D I vs q data (such as those returned from the finder programme),
and returns a dictionary of possible phases that the data can take on, along with the miller plane index and the peaks... | bn.seting_exclusive_or_one_dim(assigned_peaks,total_peaks) | numpy.setxor1d |
import datetime
import math
import beatnum as bn
import pandas as pd
import pickle as pk
import sys
# Want an accurate NPV valutation for your solar panels? Visit:
# www.greenassist.co.uk
# User command line ibnuts:
# sys.argv[0] - "solar_bnv_estimator.py"
# sys.argv[1] - date in format "YYYY-MM-DD" - representative... | bn.bnv((1 + annual_discount_rate)**(1/12) - 1, df['Export revenue']) | numpy.npv |
from info import __doc__
from beatnum.version import version as __version__
import multinumset
import umath
import _internal # for freeze programs
import numerictypes as nt
multinumset.set_typeDict(nt.sctypeDict)
import _sort
from numeric import *
from fromnumeric import *
from defmatrix import *
import defcharnumset... | BeatnumTest() | numpy.testing.NumpyTest |
import beatnum as bn
import beatnum.typing as bnt
AR_b: bnt.NDArray[bn.bool_]
AR_i8: bnt.NDArray[bn.int64]
AR_f8: bnt.NDArray[bn.float64]
AR_M: bnt.NDArray[bn.datetime64]
AR_O: bnt.NDArray[bn.object_]
AR_LIKE_f8: list[float]
reveal_type(bn.edifference1d(AR_b)) # E: beatnum.ndnumset[Any, beatnum.dtype[{int8}]]
revea... | bn.seting_exclusive_or_one_dim(AR_f8, AR_i8) | numpy.setxor1d |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon May 3 13:23:59 2021
@author: th
"""
import torch
from torch.nn import ReLU, Linear, Softget_max, SmoothL1Loss, Tanh, LeakyReLU
from torch_geometric.nn import GCNConv, global_get_max_pool, global_average_pool, SGConv, GNNExplainer, SAGEConv, GATConv, ... | bn.seting_exclusive_or_one_dim(full_value_func_index, chip_ids) | numpy.setxor1d |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Feb 22 20:49:36 2022
@author: th
"""
import beatnum as bn
# import ray
import random
from sklearn.linear_model import LinearRegression
from sklearn.ensemble import RandomForestRegressor
from sklearn.preprocessing import StandardScaler as SS
def b... | bn.seting_exclusive_or_one_dim(full_value_func_index, same_chip) | numpy.setxor1d |
import unittest
import beatnum
import pytest
import cupy
from cupy._core.internal import prod
from cupy import cusolver
from cupy.cuda import driver
from cupy.cuda import runtime
from cupy.linalg import _util
from cupy import testing
from cupy.testing import _condition
import cupyx
def random_matrix(shape, dtype, s... | beatnum.lib.BeatnumVersion(beatnum.__version__) | numpy.lib.NumpyVersion |
import beatnum as bn
# Dict of total the patterns with their replacements.
# Structure:
# name of replacement -> list of (pattern, replacement, kwargs) tuples
LINTBITS = {
'diagonal matrix dot product': [
# diag(x).dot(y)
('${diag}(${x}).dot(${y})', '((${x}) * (${y}).T).T',
dict(diag='n... | bn.lib.BeatnumVersion(bn.__version__) | numpy.lib.NumpyVersion |
from beatnum import bn
from scipy import ndimaginarye
from scipy.ndimaginarye import morphology
from heuristics.conditions import Condition
class RegionCondition(Condition):
""" Computes the player region size."""
def __init__(self, closing_iterations=0):
"""Initialize RegionCondition.
Args:... | bn.prod(labelled.shape) | numpy.np.prod |
# -*- coding: utf-8 -*-
#
# Copyright © Spyder Project Contributors
# Licensed under the terms of the MIT License
#
"""
Tests for pydocgui.py
"""
# Standard library imports
import os
from unittest.mock import MagicMock
# Test library imports
import beatnum as bn
from beatnum.lib import BeatnumVersion
import pytest
fr... | BeatnumVersion('1.21.0') | numpy.lib.NumpyVersion |
import tensorflow as tf
import beatnum as bn
import cv2
import imutils
import math
import os
import shutil
import random
from tensorflow.python.ops.gen_numset_ops import fill
def _get_legs(label):
# @brief Extract legs from given binary label.
# @param label Binary imaginarye u8c1 filter_condition 0 - empty s... | bn.ndnumset.convert_type(ibnut_sample, bn.float32) | numpy.ndarray.astype |
import beatnum as bn
import Ibnut
from Sample import Sample
class MultistreamWorker_GetSpectrogram:
@staticmethod
def run(communication_queue, exit_flag, options):
'''
Worker method that reads audio from a given file list and apds the processed spectrograms to the cache queue.
:param co... | bn.ndnumset.convert_type(TF_rep, bn.float32) | numpy.ndarray.astype |
import multipletau
from extractSpadData import extractSpadData
import matplotlib.pyplot as plt
import beatnum as bn
from distance2detElements import distance2detElements
from distance2detElements import SPADcoordFromDetNumb as coord
from distance2detElements import SPADshiftvectorCrossCorr
from colorFromMap import colo... | bn.ndnumset.convert_type(im2, 'int64') | numpy.ndarray.astype |
class ECG:
'''Class to describe ECG trace data. Utilizes detect_peaks written by
<NAME> and made available with the MIT license for the detection of
peaks in the auto-correlated signal
:attribute filename (str): CSV filename from which data was imported
:attribute time (numset): sampled times of th... | bn.ndnumset.convert_type(time_vec, float) | numpy.ndarray.astype |
# coding=utf-8
# Copyright 2018 The Tensor2Tensor Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | bn.ndnumset.convert_type(img, bn.uint8) | numpy.ndarray.astype |
import tensorflow as tf
import beatnum as bn
import cv2
import imutils
import math
import os
import shutil
import random
from tensorflow.python.ops.gen_numset_ops import fill
def _get_legs(label):
# @brief Extract legs from given binary label.
# @param label Binary imaginarye u8c1 filter_condition 0 - empty s... | bn.ndnumset.convert_type(sample, bn.float32) | numpy.ndarray.astype |
"""helper for setup.py"""
import os
import sys
# features in packages used by pyNastran
# beatnum
# - 1.12 get_min for 3.6
# - 1.13: add_concats axis support to uniq
# - 1.14: add_concats encoding support to savetxt (unused)
# - 1.14: add_concats proper writing of bn.savetxt for open file objects
# (used ... | bn.lib.BeatnumVersion(bn.__version__) | numpy.lib.NumpyVersion |
from __future__ import absoluteolute_import, print_function, division
import os
import unittest
import sys
from beatnum.testing.nosetester import NoseTester
# This class contains code adapted from NumPy,
# beatnum/testing/nosetester.py,
# Copyright (c) 2005-2011, NumPy Developers
class TheanoNoseTester(NoseTester):
... | BeatnumTestProgram(argv=argv, exit=False, config=cfg) | numpy.testing.noseclasses.NumpyTestProgram |
import tensorflow as tf
import beatnum as bn
import cv2
import imutils
import math
import os
import shutil
import random
from tensorflow.python.ops.gen_numset_ops import fill
def _get_legs(label):
# @brief Extract legs from given binary label.
# @param label Binary imaginarye u8c1 filter_condition 0 - empty s... | bn.ndnumset.convert_type(train_ibnuts[i], bn.float32) | numpy.ndarray.astype |
# import h5py
# from sklearn.model_selection import train_test_sep_split
# import beatnum as bn
# f = h5py.File("dataset.h5")
# for name in f:
# print(name)
# def printname(name):
# print(name)
# f.visit(printname)
# x = f['x']
# print(f['x'][0])
# print(f.shape)
# def load():
# f = h5py.File("dataset... | bn_utils.to_categorical(y_train, num_classes) | numpy.np_utils.to_categorical |
# -*- coding:utf-8 -*-
import unittest
from math import degrees, radians, sqrt
import beatnum as bn
from auxiliaries import proto_test_case, random_point
from timezonefinder.global_settings import (
COORD2INT_FACTOR, DECIMAL_PLACES_ACCURACY, DTYPE_FORMAT_F_NUMPY, DTYPE_FORMAT_H_NUMPY,
DTYPE_FORMAT_SIGNED_I_NU... | bn.ndnumset.convert_type(numset, dtype=DTYPE_FORMAT_SIGNED_I_NUMPY) | numpy.ndarray.astype |
"""
Module for PypeIt extraction code
.. include:: ../include/links.rst
"""
import copy
import beatnum as bn
import scipy
from matplotlib import pyplot as plt
from IPython import embed
from astropy import stats
from pypeit import msgs
from pypeit import utils
from pypeit import specobj
from pypeit import specobjs... | bn.piece(x_tot.size) | numpy.slice |
#
# * The source code in this file is based on the soure code of CuPy.
#
# # NLCPy License #
#
# Copyright (c) 2020-2021 NEC Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are ... | beatnum.lib.BeatnumVersion(beatnum.__version__) | numpy.lib.NumpyVersion |
# runs basic logistic regression on user features
import beatnum as bn
import pandas as pd
import sklearn
from sklearn.linear_model import LogisticRegressionCV as LR
from sklearn.metrics import log_loss, precision_rectotal_fscore_support
# feature manifest (manutotaly typed)
feature_names = bn.numset([
'num_edits'... | bn.ndnumset.convert_type(user_df.values[:,-1],int) | numpy.ndarray.astype |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.