Search is not available for this dataset
id
int64
0
10.8M
vector
listlengths
1.54k
1.54k
ast_depth
int64
3
164
ast_data
stringlengths
297
510k
full_path
stringlengths
0
319
code
stringlengths
60
56.5k
10,201
[ 0.02377312257885933, 0.04451477527618408, -0.023100728169083595, -0.04964320361614227, -0.030907340347766876, -0.01251336932182312, -0.028126589953899384, -0.017402473837137222, -0.009031735360622406, 0.03523801267147064, -0.004572850186377764, 0.016866836696863174, 0.029425792396068573, -...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def run(self): model_path = self.arguments[0] module_name, model_name = model_path.rsplit(".", 1) try: module = importlib.import_module(module_name) except ImportError: pass model = getattr(module, model_name, None) if model is None: ...
10,202
[ 0.01027498859912157, -0.012756363488733768, 0.026421399787068367, -0.052982594817876816, 0.005513195414096117, 0.0035065438132733107, -0.020153889432549477, 0.004589960910379887, 0.018266648054122925, -0.0026998058892786503, 0.010816697962582111, -0.0014147040201351047, 0.02052667923271656, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class Test(unittest.TestCase): def test_all(self): data = '76 A9 14 89 AB CD EF AB BA AB BA AB BA AB BA AB BA AB BA AB BA AB BA 88 AC'.replace(' ', '').decode('hex') self.assertEquals( list(script.parse(data)), [('UNK_118', None), ('UNK_169', None), ('PUSH', '\x89\xab\xcd\...
10,203
[ -0.004483853932470083, -0.03362126275897026, 0.04359760880470276, -0.017666446045041084, -0.0010865781223401427, -0.06117847189307213, -0.002854750957340002, -0.0048873089253902435, -0.009640133008360863, -0.0012692026793956757, 0.016957342624664307, -0.060885049402713776, 0.0274594016373157...
13
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "appId", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "ids", "annotation": null, "type_comment": null}}, {"_type": "arg...
def _merge_data(appId, ids, group_by, ext): eStatAPI._['appId'] = appId aggregate = request.args.get('aggregate') if request.args.get( 'aggregate') is not None else '' data = eStatAPI.merge_data(ids, group_by, aggregate) eStatAPI.path['tmp_merge'] = eStatAPI.path['tmp'] + '.'.join( [eSta...
10,204
[ 0.023419784381985664, 0.00321421236731112, 0.03683372586965561, -0.04139970988035202, -0.0007305028266273439, 0.03550107032060623, -0.033469319343566895, -0.033753328025341034, -0.016734659671783447, -0.011327573098242283, 0.011207415722310543, -0.014571825042366982, 0.00790854636579752, -...
14
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "data", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def readdate(data): datepos = -1 if data[:5] == 'DATE ': datepos = 0 else: datepos = data.find('\nDATE ') if datepos >= 0: datepos = datepos + 1 if datepos < 0: return None datestr = '' datepos = datepos + 5 while True: if datepos >= len(...
10,205
[ 0.00166787370108068, -0.007606427185237408, 0.017555957660079002, -0.009655199013650417, 0.022738484665751457, -0.01940273866057396, 0.021422654390335083, 0.03605838865041733, -0.019760550931096077, 0.0032520650420337915, -0.004293764475733042, -0.014358718879520893, 0.01192327681928873, 0...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "review_request", "annotation": null, "type_comment": null}}], "kw...
def setup_review_request_child_test(self, review_request): if not review_request.repository_id: # The group tests don't create a repository by default. review_request.repository = self.create_repository() review_request.save() diffset = self.create_diffset(review_req...
10,206
[ -0.0010642227716743946, 0.012730658985674381, 0.029179556295275688, -0.0005755882593803108, -0.006550009828060865, -0.0308539941906929, 0.0244147926568985, 0.014060359448194504, -0.02243255265057087, 0.03250380977988243, 0.000038739668525522575, -0.018886683508753777, -0.025535188615322113, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "user", "annotation": null, "type_comment": null}}, {"_type": "arg...
def setup_basic_get_test(self, user, with_local_site, local_site_name, populate_items): review_request = self.create_review_request( create_repository=True, with_local_site=with_local_site, submitter=user, publish=True) diffset...
10,207
[ 0.020553598180413246, -0.00009374372893944383, -0.02517108991742134, -0.0018035442335531116, 0.00925069022923708, 0.024982621893286705, 0.017098331823945045, 0.006811062339693308, 0.054069679230451584, -0.01242848765105009, 0.016522454097867012, -0.0034264721907675266, 0.02766307070851326, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "item_rsp", "annotation": null, "type_comment": null}}, {"_type": ...
def compare_item(self, item_rsp, comment): self.assertEqual(item_rsp['id'], comment.pk) self.assertEqual(item_rsp['text'], comment.text) if comment.rich_text: self.assertEqual(item_rsp['text_type'], 'markdown') else: self.assertEqual(item_rsp['text_type'], 'plain...
10,208
[ -0.018458807840943336, -0.0010941758519038558, 0.03442017361521721, 0.0018668988486751914, -0.003365981625393033, -0.018495898693799973, 0.01604791171848774, 0.012598476372659206, -0.006422874052077532, 0.03884633257985115, 0.014910463243722916, -0.01181339006870985, -0.04260485619306564, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "user", "annotation": null, "type_comment": null}}, {"_type": "arg...
def setup_basic_post_test(self, user, with_local_site, local_site_name, post_valid_data): review_request = self.create_review_request( create_repository=True, with_local_site=with_local_site, submitter=user, publish=True) diff...
10,209
[ 0.0016578205395489931, -0.0076008690521121025, 0.017544906586408615, -0.00965547002851963, 0.022681409493088722, -0.01939173974096775, 0.021388627588748932, 0.03605940192937851, -0.01971493475139141, 0.003229070920497179, -0.004290999379009008, -0.01439374964684248, 0.011912068352103233, 0...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "review_request", "annotation": null, "type_comment": null}}], "kw...
def setup_review_request_child_test(self, review_request): if not review_request.repository_id: # The group tests don't create a repository by default. review_request.repository = self.create_repository() review_request.save() diffset = self.create_diffset(review_req...
10,210
[ 0.020544297993183136, -0.0001226263993885368, -0.02517252415418625, -0.0017774691805243492, 0.00926168728619814, 0.02494215965270996, 0.017130719497799873, 0.006790508050471544, 0.05411464348435402, -0.012429195456206799, 0.016554808244109154, -0.0034004896879196167, 0.027685588225722313, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "item_rsp", "annotation": null, "type_comment": null}}, {"_type": ...
def compare_item(self, item_rsp, comment): self.assertEqual(item_rsp['id'], comment.pk) self.assertEqual(item_rsp['text'], comment.text) if comment.rich_text: self.assertEqual(item_rsp['text_type'], 'markdown') else: self.assertEqual(item_rsp['text_type'], 'plain...
10,211
[ 0.0048063937574625015, 0.024488849565386772, 0.024342646822333336, -0.019225575029850006, -0.018896618857979774, 0.0007264416199177504, 0.02677934803068638, 0.032408129423856735, -0.011275836266577244, 0.02543916366994381, 0.012683031149208546, -0.03472299501299858, -0.03976696729660034, -...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "user", "annotation": null, "type_comment": null}}, {"_type": "arg...
def setup_basic_delete_test(self, user, with_local_site, local_site_name): review_request = self.create_review_request( create_repository=True, with_local_site=with_local_site, submitter=user, publish=True) diffset = self.create_diffset(review_request) ...
10,212
[ -0.009295868687331676, 0.011249973438680172, 0.033756084740161896, -0.0030020475387573242, -0.005584917962551117, -0.024078024551272392, 0.0237081628292799, 0.014843800105154514, -0.027443770319223404, 0.026260212063789368, 0.0018246531253680587, -0.023609532043337822, -0.041720449924468994,...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "user", "annotation": null, "type_comment": null}}, {"_type": "arg...
def setup_basic_get_test(self, user, with_local_site, local_site_name): review_request = self.create_review_request( create_repository=True, with_local_site=with_local_site, submitter=user, publish=True) diffset = self.create_diffset(review_request) ...
10,213
[ -0.0035083601251244545, 0.007166410330682993, 0.030686456710100174, -0.006767237093299627, -0.003336840309202671, -0.01606673002243042, 0.030337180942296982, 0.020357845351099968, -0.001127353054471314, 0.015368176624178886, 0.025484729558229446, 0.004175728186964989, -0.028391210362315178, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "user", "annotation": null, "type_comment": null}}, {"_type": "arg...
def setup_basic_put_test(self, user, with_local_site, local_site_name, put_valid_data): review_request = self.create_review_request( create_repository=True, with_local_site=with_local_site, submitter=user, publish=True) diffset...
10,214
[ 0.02973681129515171, 0.025662977248430252, 0.07010480016469955, -0.02165449783205986, -0.03899552300572395, -0.020946478471159935, 0.04627178609371185, -0.010794571600854397, 0.010740107856690884, -0.03483454883098602, -0.016186410561203957, -0.051848798990249634, 0.03744877502322197, -0.0...
12
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "config", "annotation":...
class Base10xPipeline(object): def __init__(self, config): self.config = config self.summary_filename = self.config.data_10x.data_10x_cell_summary self.bam_filename = self.config.data_10x.data_10x_bam self.bai_filename = self.config.data_10x.data_10x_bai assert os.path.exis...
10,215
[ 0.03886988013982773, 0.02043924294412136, 0.08577419072389603, -0.012967662885785103, -0.04670565575361252, -0.0184637438505888, 0.05337158963084221, -0.01541772298514843, -0.0038461536169052124, 0.007670234423130751, 0.018507888540625572, -0.015406686812639236, 0.03513960540294647, -0.062...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "config", "annotation": null, "type_comment": null}}], "kwarg": nu...
def __init__(self, config): self.config = config self.summary_filename = self.config.data_10x.data_10x_cell_summary self.bam_filename = self.config.data_10x.data_10x_bam self.bai_filename = self.config.data_10x.data_10x_bai assert os.path.exists(self.summary_filename), self.summ...
10,216
[ 0.038156043738126755, 0.024477461352944374, 0.0963306576013565, -0.0034515776205807924, -0.08165346831083298, -0.0023223399184644222, 0.017626559361815453, -0.03601949289441109, -0.03518344834446907, 0.032652098685503006, 0.04451925680041313, -0.03834183141589165, -0.003190314397215843, 0....
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "segment_len", "annotation": null, "type_comment": null}}], "kwarg...
def _build_segment_regions(self, segment_len=50_000_000): with pysam.AlignmentFile(self.bam_filename, 'rb') as samfile: assert samfile.check_index(), \ (self.bam_filename, self.bai_filename) print(samfile.get_index_statistics()) sam_stats = samfile.ge...
10,217
[ 0.021512141451239586, 0.035249676555395126, 0.0957908183336258, -0.01131397020071745, -0.03232220187783241, 0.015561209060251713, 0.00735468091443181, 0.018980596214532852, -0.004391212482005358, 0.008278515189886093, 0.020828263834118843, -0.04456000775098801, -0.006964750587940216, -0.05...
13
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "config", "annotation":...
class Extract10xPipeline(Base10xPipeline): def __init__(self, config): super(Extract10xPipeline, self).__init__(config) self.reads_dirname = self.config.reads.reads_dir def _build_segment_regions(self, segment_len=50_000_000): with pysam.AlignmentFile(self.bam_filename, 'rb') ...
10,218
[ 0.027995562180876732, 0.027614019811153412, 0.08064819872379303, -0.012638541869819164, -0.06366963684558868, -0.004992819856852293, 0.019780509173870087, -0.01788472756743431, -0.02496708184480667, 0.00838793721050024, 0.05198494344949722, -0.015905484557151794, -0.0066233109682798386, 0....
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "segment", "annotation": null, "type_comment": null}}, {"_type": "...
def _process_segment(self, segment, region): with pysam.AlignmentFile(self.bam_filename, 'rb') as samfile: assert samfile.check_index(), \ (self.bam_filename, self.bai_filename) chrom, begin, end = region mapped = 0 cell_records = defaultdict(lamb...
10,219
[ 0.01379632018506527, 0.005223207641392946, 0.051482755690813065, -0.035394392907619476, -0.046149350702762604, -0.04299779608845711, 0.037289734929800034, -0.02501409500837326, -0.02499205619096756, -0.001359521527774632, 0.018567731603980064, -0.0077301268465816975, 0.01939418725669384, -...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "cell_id", "annotation": null, "type_comment": null}}], "kwarg": n...
def _cell_fragments(self, cell_id): cell_name = self._cell_name(cell_id) pattern = f"{cell_name}_*{self.config.reads.reads_suffix}" pattern = os.path.join( self.reads_dirname, cell_name, pattern ) print(colored( "merging fastq cell...
10,220
[ 0.026036206632852554, 0.05179169774055481, 0.07640094310045242, 0.011339668184518814, -0.058388471603393555, 0.0009254783508367836, 0.03906600549817085, 0.023813888430595398, -0.028773166239261627, 0.016831131651997566, 0.042621713131666183, -0.0012866049073636532, 0.01518193818628788, -0....
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "dry_run", "annotation": null, "type_comment": null}}, {"_type": "...
def _split_once(self, dry_run, segment): segment_index, region = segment contig, begin, end = region print(colored( "processing 10x bam file {} segment {}, {}:{}-{}".format( self.bam_filename, segment_index, contig, begi...
10,221
[ 0.032235827296972275, 0.04257696494460106, 0.04402710124850273, -0.04336146265268326, -0.05011292174458504, -0.028099369257688522, -0.018697254359722137, -0.012153809890151024, -0.020385118201375008, -0.035849280655384064, 0.04096041992306709, 0.010638297535479069, -0.014002139680087566, -...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "barcode", "annotation": null, "type_comment": null}}, {"_type": "...
def _write_to_fastq(self, barcode, segment, records): cell = self.barcodes[barcode] filename = self._cell_segment_filename(cell, segment) os.makedirs(os.path.dirname(filename), exist_ok=True) with gzip.open(filename, "at") as outfile: for rec in records: ass...
10,222
[ 0.0281571876257658, 0.028845814988017082, 0.055141158401966095, -0.03511996939778328, -0.056008320301771164, -0.025224147364497185, 0.05200408026576042, -0.028437739238142967, -0.024407997727394104, 0.02363010309636593, 0.015812912955880165, -0.009608895517885685, 0.01659080758690834, -0.0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "dry_run", "annotation": null, "type_comment": null}}, {"_type": "...
def _merge_cell(self, dry_run, cell_id): filenames = self._cell_fragments(cell_id) if not filenames: print(colored( f"can't find segments for cell {cell_id}", 'red')) return [] cell_name = self._cell_name(cell_id) outfile = os.path.join( ...
10,223
[ 0.023461895063519478, 0.028352368623018265, 0.06705521047115326, -0.015649516135454178, -0.01995808631181717, 0.022384751588106155, 0.012801899574697018, 0.03771236538887024, -0.012579042464494705, 0.024836178869009018, 0.020465705543756485, -0.008078567683696747, 0.0032933319453150034, -0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "dask_client", "annotation": null, "type_comment": null}}], "kwarg...
def run(self, dask_client): try: self.config.check_nonempty_workdir(self.reads_dirname) except ValueError: return command = "rm -rf {}/*".format(self.reads_dirname) print(colored(command, 'yellow')) os.system(command) os.makedirs(self.reads_dirnam...
10,224
[ 0.0046239616349339485, 0.00951071921736002, 0.0497310496866703, -0.011631859466433525, -0.025240948423743248, -0.0015525310300290585, -0.008459534496068954, 0.0028516515158116817, 0.013665401376783848, -0.0009448148775845766, 0.019321776926517487, 0.0007441980997100472, -0.022850753739476204...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_basic_toc(self) -> None: header = "# Header\n\n<!-- toc -->" toc = ( "\n\n## Table of contents\n\n" "- [Section](#section)\n" " - [More](#more)\n" " - [Even more](#even-more)\n" "- [Other section](#other-section)\n" ...
10,225
[ 0.00106605957262218, 0.015402945689857006, 0.05432381108403206, -0.01767720654606819, -0.022923510521650314, 0.03491506725549698, 0.00047488106065429747, -0.017793502658605576, 0.023802202194929123, 0.029772136360406876, 0.029074352234601974, 0.005969933699816465, -0.010763971135020256, 0....
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class TestMarkdownToc(file_test_case.FileTestCase): def setUp(self) -> None: self.setup_helper( lambda filename: markdown_toc.main(argv=["bin", filename]) ) def test_wrong_ext(self) -> None: contents = "<!-- toc --><!-- tocstop -->\n" self.assert_exit_code(contents, ...
10,226
[ 0.017931636422872543, -0.003633207641541958, 0.024612050503492355, -0.008356377482414246, -0.024846451357007027, 0.007266415283083916, -0.00015400844858959317, -0.03401150926947594, 0.0480520986020565, -0.015892352908849716, 0.032792627811431885, 0.010823442600667477, -0.020428001880645752, ...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_codeblock_toc(self) -> None: header = "# Header\n\n<!-- toc -->" toc = ( "\n\n## Table of contents\n\n" "- [Section](#section)\n" " - [More](#more)\n" "\n" ) body = ( "<!-- tocstop -->\n\n" "## Sectio...
10,227
[ 0.011814306490123272, 0.014480337500572205, 0.0383748896420002, -0.004441168624907732, -0.025928979739546776, 0.0003037513524759561, -0.0017751377308741212, -0.013749007135629654, 0.014520227909088135, 0.007393083069473505, 0.034545376896858215, 0.015982888638973236, -0.014294181019067764, ...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_weird_toc(self) -> None: header = "# Header\n\n<!-- toc -->" toc = ( "\n\n## Table of contents\n\n" "- [Advanced Find & Replace](#advanced-find--replace)\n" "- [Package as `package`](#package-as-package)\n" "- [Something _italicized_](#somet...
10,228
[ -0.005982803646475077, -0.01930244453251362, 0.04208839684724808, 0.03111296519637108, 0.014924202114343643, -0.01210280042141676, 0.007664907723665237, 0.04843505844473839, 0.05716768652200699, -0.018872970715165138, 0.028416825458407402, -0.03485892713069916, 0.03266384080052376, 0.00718...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_rpc_consumer_isolation(self): class NeverCalled(object): def __getattribute__(*args): assert False, "I should never get called." server = rpc.get_server(messaging.Target(topic='compute', server=CONF.host), ...
10,229
[ 0.030246535316109657, 0.02530965395271778, 0.070028156042099, -0.030324691906571388, -0.03097599372267723, 0.02451506443321705, -0.002706166123971343, -0.0070731560699641705, 0.014875772409141064, -0.005669597070664167, 0.02382468245923519, 0.003201156621798873, 0.00009586373198544607, -0....
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_repeating_toc(self) -> None: header = "# Header\n\n<!-- toc -->" toc = ( "\n\n## Table of contents\n\n" "- [Bork](#bork)\n" "- [Bork](#bork-1)\n" "- [Bork](#bork-2)\n" "\n" ) body = "<!-- tocstop -->\n\n## Bork\n\...
10,230
[ 0.01790856197476387, -0.03145093843340874, 0.005574684590101242, -0.031235026195645332, 0.0030452352948486805, 0.042558323591947556, 0.01136527955532074, -0.03658480569720268, 0.04798007011413574, -0.009697971865534782, 0.0321226567029953, -0.04706845059990883, 0.014993772841989994, -0.014...
12
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class JsonTestCase(test.TestCase): def test_json_equal(self): expected = { "employees": [ {"firstName": "Anna", "lastName": "Smith"}, {"firstName": "John", "lastName": "Doe"}, {"firstName": "Peter", "lastName": "Jones"} ], "...
10,231
[ 0.04527176171541214, -0.012990429997444153, -0.02334611676633358, -0.04211007058620453, -0.019554378464818, 0.04467608407139778, 0.01253221370279789, -0.03145654499530792, 0.035649221390485764, 0.026714006438851357, 0.006672773975878954, -0.0425453782081604, 0.010327048599720001, -0.004055...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_json_equal_fail_on_length(self): expected = { 'top': { 'l1': { 'l2': ['a', 'b', 'c'] } } } observed = { 'top': { 'l1': { 'l2': ['c', 'a', 'b', 'd'] ...
10,232
[ 0.039084017276763916, -0.015325476415455341, -0.01574249565601349, -0.02865852415561676, 0.008415690623223782, 0.047910936176776886, 0.019553594291210175, -0.011699721217155457, 0.03977905213832855, 0.0030465610325336456, 0.014167088083922863, -0.030511945486068726, 0.01102206390351057, -0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_json_equal_fail_on_inner(self): expected = { 'top': { 'l1': { 'l2': ['a', 'b', 'c'] } } } observed = { 'top': { 'l1': { 'l2': ['c', 'a', 'd'] } ...
10,233
[ -0.02750605344772339, -0.006759271025657654, -0.005038868170231581, -0.05085255578160286, -0.004715177696198225, 0.005729577969759703, 0.011877150274813175, -0.022571682929992676, -0.002485026139765978, 0.032053012400865555, -0.03413278982043266, -0.05811138078570366, 0.04082069545984268, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class MatchTypeTestCase(test.TestCase): def test_match_type_simple(self): matcher = test.MatchType(dict) self.assertEqual(matcher, {}) self.assertEqual(matcher, {"hello": "world"}) self.assertEqual(matcher, {"hello": ["world"]}) self.assertNotEqual(matcher, []) self...
10,234
[ -0.009045160375535488, -0.0010876101441681385, -0.023223215714097023, -0.04152218997478485, 0.00582145294174552, -0.006468281149864197, 0.02405783161520958, -0.014751853421330452, 0.01340603455901146, 0.033113427460193634, -0.03054697811603546, -0.05679567903280258, 0.05107855424284935, -0...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_match_type_simple(self): matcher = test.MatchType(dict) self.assertEqual(matcher, {}) self.assertEqual(matcher, {"hello": "world"}) self.assertEqual(matcher, {"hello": ["world"]}) self.assertNotEqual(matcher, []) self.assertNotEqual(matcher, [{"hello": "world"}]...
10,235
[ -0.006209380924701691, 0.0008727778331376612, 0.012450741603970528, -0.03782125934958458, 0.00610278220847249, -0.001387117081321776, -0.012141604907810688, -0.030508581548929214, 0.019752761349081993, 0.03072177805006504, -0.03018878400325775, -0.05312884971499443, 0.03072177805006504, -0...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_match_type_object(self): class Hello(object): pass class World(object): pass matcher = test.MatchType(Hello) self.assertEqual(matcher, Hello()) self.assertNotEqual(matcher, World()) self.assertNotEqual(matcher, 123) self.assertN...
10,236
[ 0.008464899845421314, 0.01799813285470009, -0.010994013398885727, -0.028757765889167786, 0.010203665122389793, 0.020538147538900375, -0.048402003943920135, 0.0027062606532126665, 0.04534962400794029, 0.04718105122447014, 0.014019138179719448, -0.0667162761092186, -0.0028643303085118532, -0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"a...
def main(): argument_spec = openstack_full_argument_spec( name=dict(required=False, default=None), filters=dict(required=False, type='dict', default=None) ) module = AnsibleModule(argument_spec) shade, cloud = openstack_cloud_from_module(module) try: subnets = cloud.search_...
10,237
[ -0.021145127713680267, -0.022456739097833633, 0.012895463034510612, -0.0034230591263622046, -0.012313205748796463, -0.002981769386678934, 0.002715156879276037, 0.027997374534606934, -0.020385129377245903, 0.0034475750289857388, -0.024087058380246162, -0.018264487385749817, -0.002436286304146...
15
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class TORRENTPROJECTProvider(generic.TorrentProvider): def __init__(self): generic.TorrentProvider.__init__(self, "TorrentProject") self.supportsBacklog = True self.public = True self.ratio = 0 self.urls = {'api': u'https://torrentproject.se/',} self.url = self.urls...
10,238
[ 0.022129816934466362, -0.002487386344000697, -0.025323810055851936, -0.03584371134638786, -0.004220635164529085, -0.0002964663435705006, 0.010805079713463783, 0.053638823330402374, -0.008529992774128914, 0.02930362895131111, -0.008156091906130314, -0.05120530351996422, -0.008853194303810596,...
14
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "search_strings", "annotation": null, "type_comment": null}}, {"_t...
def _doSearch(self, search_strings, search_mode='eponly', epcount=0, age=0, epObj=None): results = [] items = {'Season': [], 'Episode': [], 'RSS': []} for mode in search_strings.keys(): # Mode = RSS, Season, Episode logger.log(u"Search Mode: %s" % mode, logger.DEBUG) f...
10,239
[ -0.01600148342549801, -0.03580847755074501, 0.011582734994590282, 0.034753937274217606, -0.021274177357554436, -0.03223221376538277, 0.008797377347946167, 0.0037023487966507673, -0.009124054573476315, -0.00905528012663126, -0.012436682358384132, 0.0017881313106045127, -0.009691442362964153, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def __init__(self): generic.TorrentProvider.__init__(self, "TorrentProject") self.supportsBacklog = True self.public = True self.ratio = 0 self.urls = {'api': u'https://torrentproject.se/',} self.url = self.urls['api'] self.headers.update({'User-Agent': USER_AGEN...
10,240
[ -0.004360293038189411, -0.019216157495975494, 0.053301043808460236, -0.0200650654733181, 0.02708783745765686, 0.02886282466351986, 0.0029358018655329943, 0.021209802478551865, 0.018688807263970375, 0.006868426222354174, 0.05649087578058243, 0.006328212562948465, 0.020193686708807945, -0.02...
12
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "TimedeltaIndex", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Name", "_fields": {"id": "_holder", "ctx": {"_type": "Store", "_fields": {}...
class TestTimedeltaIndex(DatetimeLike): _holder = TimedeltaIndex def setup_method(self, method): self.indices = dict(index=tm.makeTimedeltaIndex(10)) self.setup_indices() def create_index(self): return pd.to_timedelta(range(5), unit='d') + pd.offsets.Hour(1) def test_numeric_c...
10,241
[ -0.01909104362130165, -0.008480805903673172, 0.04224401339888573, -0.024359237402677536, 0.01030251756310463, 0.009022395126521587, 0.016124607995152473, 0.03409554809331894, 0.04601052403450012, 0.004280406516045332, 0.05238651484251022, 0.008179238997399807, 0.0009777852101251483, -0.017...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_fillna_timedelta(self): # GH 11343 idx = pd.TimedeltaIndex(['1 day', pd.NaT, '3 day']) exp = pd.TimedeltaIndex(['1 day', '2 day', '3 day']) tm.assert_index_equal(idx.fillna(pd.Timedelta('2 day')), exp) exp = pd.TimedeltaIndex(['1 day', '3 hour', '3 day']) idx.f...
10,242
[ -0.009611358866095543, -0.0003199232742190361, 0.031120244413614273, -0.011909342370927334, 0.015607381239533424, 0.007904116995632648, -0.0009097413858398795, 0.022696275264024734, 0.013008120469748974, 0.0048706610687077045, 0.037854693830013275, -0.016469864174723625, 0.034546542912721634...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_isin(self): index = tm.makeTimedeltaIndex(4) result = index.isin(index) assert result.all() result = index.isin(list(index)) assert result.all() assert_almost_equal(index.isin([index[2], 5]), np.array([False, False, True, False]))
10,243
[ -0.0038545599672943354, -0.023871062323451042, 0.03949487954378128, -0.028925826773047447, 0.021887853741645813, 0.04014788568019867, 0.011584841646254063, -0.018429331481456757, 0.05519125238060951, 0.02280690148472786, 0.020376261323690414, -0.008477008901536465, -0.00743098696693778, 0....
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_difference_freq(self): # GH14323: Difference of TimedeltaIndex should not preserve frequency index = timedelta_range("0 days", "5 days", freq="D") other = timedelta_range("1 days", "4 days", freq="D") expected = TimedeltaIndex(["0 days", "5 days"], freq=None) idx_diff ...
10,244
[ 0.02323720045387745, -0.015511277131736279, 0.06123685836791992, -0.0034736942034214735, 0.04780563712120056, -0.003946164157241583, 0.027123935520648956, 0.04048383980989456, 0.02845517173409462, 0.016402730718255043, -0.020931309089064598, -0.027219023555517197, 0.010459711775183678, 0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_does_not_convert_mixed_integer(self): df = tm.makeCustomDataframe(10, 10, data_gen_f=lambda *args, **kwargs: randn(), r_idx_type='i', c_idx_type='td') str(df) cols = df.columns.join(df.index, how='outer') j...
10,245
[ -0.022387981414794922, -0.017200229689478874, 0.04193533957004547, -0.016357671469449997, 0.025276754051446915, 0.014347567223012447, 0.006319188512861729, 0.013131875544786453, 0.038637325167655945, 0.04845914617180824, 0.044800035655498505, 0.022255579009652138, -0.009370453655719757, 0....
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_factorize(self): idx1 = TimedeltaIndex(['1 day', '1 day', '2 day', '2 day', '3 day', '3 day']) exp_arr = np.array([0, 0, 1, 1, 2, 2], dtype=np.intp) exp_idx = TimedeltaIndex(['1 day', '2 day', '3 day']) arr, idx = idx1.factorize() tm.asse...
10,246
[ 0.015764683485031128, -0.0009626596583984792, 0.009880087338387966, -0.037661418318748474, 0.033171020448207855, 0.035609353333711624, -0.03799940645694733, -0.012185642495751381, 0.026628555729985237, 0.00513016153126955, 0.032350193709135056, 0.004303299821913242, 0.0007340657175518572, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_sort_values(self): idx = TimedeltaIndex(['4d', '1d', '2d']) ordered = idx.sort_values() assert ordered.is_monotonic ordered = idx.sort_values(ascending=False) assert ordered[::-1].is_monotonic ordered, dexer = idx.sort_values(return_indexer=True) asse...
10,247
[ -0.013451870530843735, -0.03411581367254257, 0.056219711899757385, -0.0383002944290638, -0.02035626210272312, 0.049524545669555664, -0.0024183830246329308, 0.0372418649494648, 0.04543852433562279, 0.012578052468597889, 0.009630456566810608, -0.0017414818285033107, 0.006695167161524296, -0....
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_get_duplicates(self): idx = TimedeltaIndex(['1 day', '2 day', '2 day', '3 day', '3day', '4day']) with tm.assert_produces_warning(FutureWarning): # Deprecated - see GH20239 result = idx.get_duplicates() ex = TimedeltaIndex(['2 day',...
10,248
[ -0.009489448741078377, 0.0048368857242167, 0.07718677818775177, -0.013423788361251354, 0.0043919687159359455, 0.02867809310555458, 0.004957648925483227, 0.0005422428366728127, 0.037067960947752, 0.017847536131739616, 0.015292440541088581, -0.01268649660050869, 0.026669608429074287, -0.0268...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_misc_coverage(self): rng = timedelta_range('1 day', periods=5) result = rng.groupby(rng.days) assert isinstance(list(result.values())[0][0], Timedelta) idx = TimedeltaIndex(['3d', '1d', '2d']) assert not idx.equals(list(idx)) non_td = Index(list('abc')) ...
10,249
[ 0.004712620284408331, 0.007159611210227013, 0.05575903132557869, -0.016596011817455292, 0.007053584326058626, 0.033705417066812515, 0.02477683126926422, 0.019631732255220413, 0.02235495112836361, 0.014787973836064339, 0.028258981183171272, -0.005920769646763802, 0.03468756377696991, -0.026...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_map(self): # test_map_dictlike generally tests rng = timedelta_range('1 day', periods=10) f = lambda x: x.days result = rng.map(f) exp = Int64Index([f(x) for x in rng]) tm.assert_index_equal(result, exp)
10,250
[ 0.004313354380428791, 0.01831255853176117, 0.03465511277318001, -0.023576492443680763, 0.02609724923968315, 0.013578196056187153, 0.018079547211527824, 0.020081326365470886, 0.021712403744459152, 0.0020653260871767998, 0.012084806337952614, -0.002253323793411255, 0.014192498289048672, -0.0...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_pass_TimedeltaIndex_to_index(self): rng = timedelta_range('1 days', '10 days') idx = Index(rng, dtype=object) expected = Index(rng.to_pytimedelta(), dtype=object) tm.assert_numpy_array_equal(idx.values, expected.values)
10,251
[ 0.010828105732798576, -0.00029098495724610984, 0.07653601467609406, -0.021036531776189804, 0.0074905273504555225, 0.041725173592567444, 0.0009023422026075423, 0.02741815708577633, 0.007148072123527527, -0.011926136910915375, -0.0026907192077487707, -0.0048867808654904366, -0.0005714381113648...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_append_join_nondatetimeindex(self): rng = timedelta_range('1 days', periods=10) idx = Index(['a', 'b', 'c', 'd']) result = rng.append(idx) assert isinstance(result[0], Timedelta) # it works rng.join(idx, how='outer')
10,252
[ -0.0157499760389328, 0.02327425591647625, 0.07529380917549133, -0.030403191223740578, 0.03879467770457268, 0.013428926467895508, 0.014232366345822811, 0.018440861254930496, 0.020634381100535393, 0.018581144511699677, 0.03904973715543747, -0.0025952388532459736, -0.0038035872858017683, -0.0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_fields(self): rng = timedelta_range('1 days, 10:11:12.100123456', periods=2, freq='s') tm.assert_index_equal(rng.days, Index([1, 1], dtype='int64')) tm.assert_index_equal( rng.seconds, Index([10 * 3600 + 11 * 60 + 12, 10 * 3600 + 11 ...
10,253
[ 0.02471107617020607, -0.050338272005319595, 0.032256994396448135, -0.004026097245514393, -0.00381213566288352, 0.04599876329302788, 0.031123902648687363, -0.023529766127467155, 0.01328370999544859, 0.015742763876914978, -0.0056383442133665085, -0.02207121066749096, 0.017394186928868294, 0....
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_append_numpy_bug_1681(self): td = timedelta_range('1 days', '10 days', freq='2D') a = DataFrame() c = DataFrame({'A': 'foo', 'B': td}, index=td) str(c) result = a.append(c) assert (result['B'] == td).all()
10,254
[ 0.004441473167389631, -0.01234509702771902, 0.009680724702775478, -0.008698844350874424, 0.06909981369972229, -0.010851820930838585, -0.04426642879843712, 0.023258285596966743, 0.024608369916677475, 0.012478060089051723, 0.01296900026500225, -0.004709956236183643, 0.02847452275454998, 0.04...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "request", "annotation": null, "type_comment": null}}, {"_type": "...
def has_permission(self, request, view): # session-based auth has all scopes for a logged in user if not request.auth: return request.user.is_authenticated() allowed_scopes = set(self.scope_map.get(request.method, [])) current_scopes = request.auth.get_scopes() retur...
10,255
[ -0.03529835864901543, -0.06415613740682602, 0.04535863921046257, -0.043361563235521317, 0.03003106452524662, 0.030779968947172165, 0.013505241833627224, 0.0022529540583491325, 0.0569167323410511, 0.018872389569878578, 0.03352595120668411, 0.015327575616538525, -0.023116180673241615, -0.009...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_freq_conversion(self): # doc example # series td = Series(date_range('20130101', periods=4)) - \ Series(date_range('20121201', periods=4)) td[2] += timedelta(minutes=5, seconds=3) td[3] = np.nan result = td / np.timedelta64(1, 'D') expected...
10,256
[ -0.06046301871538162, -0.0588381290435791, 0.027003109455108643, -0.01649477332830429, 0.0024774230550974607, -0.0008077681995928288, -0.003664020448923111, 0.006109373643994331, 0.01263565942645073, 0.04968743398785591, -0.015874749049544334, -0.03127913549542427, -0.006307139527052641, -...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class URLTests(TestCase): def setUp(self): self.client = Client() self.client.login( username=settings.TEST_USERNAME, password=settings.TEST_PASSWORD) def test_urls(self): urls = [ "/date/", "/date/month/", "/date/month/add/", ...
10,257
[ -0.04766402021050453, -0.04974818602204323, 0.020331965759396553, -0.04870610311627388, 0.019357843324542046, 0.005626687314361334, -0.03176090866327286, 0.012640932574868202, 0.04331444948911667, 0.04938572272658348, -0.001810904243029654, -0.0588550940155983, -0.021838456392288208, -0.04...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_urls(self): urls = [ "/date/", "/date/month/", "/date/month/add/", "/date/month/1/", "/date/season/", "/date/season/add/", "/date/season/5/", "/date/weekday/", "/date/weekday/add/", "...
10,258
[ -0.005406240466982126, 0.025617847219109535, 0.0437823086977005, -0.039244361221790314, 0.019267257302999496, -0.01452649850398302, -0.05993131175637245, -0.0012691672891378403, 0.01105332188308239, 0.031892381608486176, -0.0072378977201879025, -0.04079081490635872, 0.03997955843806267, -0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "src"}}, {"_type": ...
class TestKind(util.F2PyTest): sources = [_path('src', 'kind', 'foo.f90')] @dec.slow def test_all(self): selectedrealkind = self.module.selectedrealkind selectedintkind = self.module.selectedintkind for i in range(40): assert_(selectedintkind(i) in [selected_int_kind(i)...
10,259
[ 0.03941787779331207, 0.02126593329012394, 0.037445686757564545, -0.015647782012820244, 0.009653357788920403, 0.008174214512109756, -0.027896128594875336, 0.008809986524283886, -0.011041677556931973, 0.04663194715976715, -0.002538223285228014, -0.04663194715976715, -0.006883207708597183, 0....
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_all(self): selectedrealkind = self.module.selectedrealkind selectedintkind = self.module.selectedintkind for i in range(40): assert_(selectedintkind(i) in [selected_int_kind(i), -1], 'selectedintkind(%s): expected %r but got %r' % (i,...
10,260
[ -0.004837772808969021, -0.030642298981547356, 0.013773062266409397, -0.013662484474480152, 0.0015189071418717504, -0.014633110724389553, -0.03499168902635574, -0.013121883384883404, 0.0033234732691198587, 0.020702596753835678, -0.002186980564147234, -0.01795044168829918, -0.01723782904446125...
8
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class TestShapiro(TestCase): def test_basic(self): x1 = [0.11,7.87,4.61,10.14,7.95,3.14,0.46, 4.43,0.21,4.75,0.71,1.52,3.24, 0.93,0.42,4.97,9.53,4.55,0.47,6.66] w,pw = stats.shapiro(x1) assert_almost_equal(w,0.90047299861907959,6) assert_almost_equal(pw,0....
10,261
[ 0.005843997001647949, -0.04564448446035385, 0.0204226765781641, -0.033910345286130905, -0.004947456065565348, -0.01421281136572361, -0.010593686252832413, -0.0095982626080513, 0.00605494761839509, 0.021978437900543213, 0.020554520189762115, 0.017311152070760727, -0.04725298285484314, 0.020...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_basic(self): x1 = [0.11,7.87,4.61,10.14,7.95,3.14,0.46, 4.43,0.21,4.75,0.71,1.52,3.24, 0.93,0.42,4.97,9.53,4.55,0.47,6.66] w,pw = stats.shapiro(x1) assert_almost_equal(w,0.90047299861907959,6) assert_almost_equal(pw,0.042089745402336121,6) x2 ...
10,262
[ 0.017948487773537636, -0.056044578552246094, 0.004911801777780056, 0.003191683441400528, -0.0062088859267532825, 0.015973232686519623, 0.0048986333422362804, -0.005955394823104143, 0.017487594857811928, 0.04424571990966797, -0.026126043871045113, -0.031130025163292885, -0.002409811597317457,...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_normal(self): rs = RandomState(1234567890) x1 = rs.standard_exponential(size=50) x2 = rs.standard_normal(size=50) A,crit,sig = stats.anderson(x1) assert_array_less(crit[:-1], A) A,crit,sig = stats.anderson(x2) assert_array_less(A, crit[-2:])
10,263
[ -0.001921966322697699, -0.031487394124269485, -0.006153577473014593, 0.007135916035622358, 0.0007482526707462966, 0.018043486401438713, -0.01682131178677082, -0.009271434508264065, 0.022669347003102303, 0.035508736968040466, -0.01985703408718109, -0.039109550416469574, 0.015467721968889236, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class TestAnderson(TestCase): def test_normal(self): rs = RandomState(1234567890) x1 = rs.standard_exponential(size=50) x2 = rs.standard_normal(size=50) A,crit,sig = stats.anderson(x1) assert_array_less(crit[:-1], A) A,crit,sig = stats.anderson(x2) assert_arra...
10,264
[ 0.014567079022526741, -0.05855577811598778, 0.010528254322707653, -0.0028296930249780416, -0.018584344536066055, 0.010269539430737495, 0.0004179411625955254, 0.010183300822973251, 0.02431918866932392, 0.04225674644112587, -0.008839421905577183, -0.03696746751666069, 0.01726202480494976, 0....
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_expon(self): rs = RandomState(1234567890) x1 = rs.standard_exponential(size=50) x2 = rs.standard_normal(size=50) A,crit,sig = stats.anderson(x1,'expon') assert_array_less(A, crit[-2:]) olderr = np.seterr(all='ignore') try: A,crit,sig = stats.a...
10,265
[ -0.009957813657820225, -0.03700987249612808, 0.027715913951396942, -0.026070108637213707, 0.013491453602910042, 0.012440351769328117, -0.015545252710580826, -0.01929326355457306, 0.010759970173239708, 0.058806419372558594, 0.004014243371784687, -0.04431226849555969, 0.02725951373577118, 0....
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class TestAndersonKSamp(TestCase): def test_example1a(self): # Example data from Scholz & Stephens (1987), originally # published in Lehmann (1995, Nonparametrics, Statistical # Methods Based on Ranks, p. 309) # Pass a mixture of lists and arrays t1 = [38.7, 41.5, 43.8, 44.5,...
10,266
[ -0.019425740465521812, -0.0301032904535532, 0.0267335195094347, -0.026244573295116425, 0.008305495604872704, 0.00118850520811975, -0.006283632479608059, 0.01591060683131218, -0.006049070041626692, 0.05766934156417847, -0.001143079367466271, 0.0036109413485974073, 0.005619589239358902, 0.02...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_example1b(self): # Example data from Scholz & Stephens (1987), originally # published in Lehmann (1995, Nonparametrics, Statistical # Methods Based on Ranks, p. 309) # Pass arrays t1 = np.array([38.7, 41.5, 43.8, 44.5, 45.5, 46.0, 47.7, 58.0]) t2 = np.array([39.2...
10,267
[ -0.032050006091594696, -0.029932992532849312, 0.028834287077188492, -0.03046894632279873, 0.00826038047671318, -0.006940595339983702, -0.0013758926652371883, 0.026677075773477554, -0.007851716130971909, 0.06640461832284927, 0.00028660940006375313, -0.003828716464340687, 0.001318110153079033,...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_example1a(self): # Example data from Scholz & Stephens (1987), originally # published in Lehmann (1995, Nonparametrics, Statistical # Methods Based on Ranks, p. 309) # Pass a mixture of lists and arrays t1 = [38.7, 41.5, 43.8, 44.5, 45.5, 46.0, 47.7, 58.0] t2 = n...
10,268
[ -0.013651003129780293, -0.02405848354101181, 0.01611890085041523, -0.047806717455387115, 0.005200214218348265, 0.02405848354101181, 0.013721514493227005, 0.010104280896484852, 0.001659661647863686, 0.03776589408516884, 0.01425740122795105, 0.015315071679651737, -0.00525662349537015, 0.0044...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_example2b(self): # Example data taken from an earlier technical report of # Scholz and Stephens t1 = [194, 15, 41, 29, 33, 181] t2 = [413, 14, 58, 37, 100, 65, 9, 169, 447, 184, 36, 201, 118] t3 = [34, 31, 18, 18, 67, 57, 62, 7, 22, 34] t4 = [90, 10, 60, 186, 61,...
10,269
[ -0.014951921999454498, -0.02648421749472618, 0.018257083371281624, -0.04549963027238846, 0.007225569803267717, 0.020245904102921486, 0.007490268908441067, 0.010888433083891869, 0.0018850868800655007, 0.043668195605278015, 0.01420074887573719, 0.009858253411948681, 0.004957742523401976, 0.0...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_example2a(self): # Example data taken from an earlier technical report of # Scholz and Stephens # Pass lists instead of arrays t1 = [194, 15, 41, 29, 33, 181] t2 = [413, 14, 58, 37, 100, 65, 9, 169, 447, 184, 36, 201, 118] t3 = [34, 31, 18, 18, 67, 57, 62, 7, 22,...
10,270
[ -0.020328868180513382, -0.04656461253762245, 0.016800083220005035, -0.05477287247776985, -0.02601839415729046, -0.0011139324633404613, -0.0395326167345047, -0.03779379278421402, 0.012299604713916779, 0.03815178573131561, 0.01827041059732437, -0.05119294673204422, -0.010183611884713173, 0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class TestAnsari(TestCase): def test_small(self): x = [1,2,3,3,4] y = [3,2,6,1,6,1,4,1] W, pval = stats.ansari(x,y) assert_almost_equal(W,23.5,11) assert_almost_equal(pval,0.13499256881897437,11) def test_approx(self): ramsay = np.array((111, 107, 100, 99, 102, ...
10,271
[ -0.029668040573596954, -0.03015752136707306, 0.021442025899887085, -0.03624885156750679, -0.021006930619478226, -0.015309905633330345, -0.009368139319121838, 0.0028791052754968405, 0.013542331755161285, 0.03358389437198639, 0.022801697254180908, -0.02103412337601185, -0.03554182127118111, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_approx(self): ramsay = np.array((111, 107, 100, 99, 102, 106, 109, 108, 104, 99, 101, 96, 97, 102, 107, 113, 116, 113, 110, 98)) parekh = np.array((107, 108, 106, 98, 105, 103, 110, 105, 104, 100, 96, 108, 103, 104, 114, 114, 113, 108, 106, ...
10,272
[ -0.004436441697180271, -0.00913385022431612, 0.04718760773539543, -0.010806412436068058, -0.014602298848330975, -0.006595351733267307, -0.03399690240621567, -0.04915672168135643, 0.0006157193565741181, -0.02683216892182827, 0.0017555971862748265, -0.012822977267205715, 0.04697408899664879, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class TestBartlett(TestCase): def test_data(self): args = [g1, g2, g3, g4, g5, g6, g7, g8, g9, g10] T, pval = stats.bartlett(*args) assert_almost_equal(T,20.78587342806484,7) assert_almost_equal(pval,0.0136358632781,7) def test_bad_arg(self): # Too few args raises Value...
10,273
[ -0.024405373260378838, -0.008569628931581974, 0.052527692168951035, -0.02031414955854416, 0.005714161321520805, 0.023166390135884285, -0.042099591344594955, -0.02192740887403488, 0.0034330138005316257, 0.05725131556391716, 0.01968175172805786, -0.018687985837459564, -0.009518224745988846, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class TestLevene(TestCase): def test_data(self): args = [g1, g2, g3, g4, g5, g6, g7, g8, g9, g10] W, pval = stats.levene(*args) assert_almost_equal(W,1.7059176930008939,7) assert_almost_equal(pval,0.0990829755522,7) def test_trimmed1(self): # Test that center='trimmed' ...
10,274
[ 0.01273252721875906, -0.02222873643040657, 0.026109740138053894, -0.048815540969371796, -0.00046981414197944105, 0.025735821574926376, 0.0003590089036151767, 0.01797381602227688, 0.010959643870592117, 0.06544841080904007, 0.03027440421283245, -0.007968305610120296, -0.04164664447307587, 0....
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_trimmed2(self): x = [1.2, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 100.0] y = [0.0, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5, 200.0] np.random.seed(1234) x2 = np.random.permutation(x) # Use center='trimmed' W0, pval0 = stats.levene(x, y, center='trimmed', proportiontocut=0.125) ...
10,275
[ -0.005602774675935507, -0.029022542759776115, 0.048461318016052246, -0.030152702704072, 0.022704940289258957, 0.0031927055679261684, 0.006803570780903101, -0.00871354341506958, 0.01887369342148304, 0.04495781660079956, 0.009826752357184887, -0.007283889688551426, -0.04927503317594528, 0.03...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_equal_mean_median(self): x = np.linspace(-1,1,21) np.random.seed(1234) x2 = np.random.permutation(x) y = x**3 W1, pval1 = stats.levene(x, y, center='mean') W2, pval2 = stats.levene(x2, y, center='median') assert_almost_equal(W1, W2) assert_almost_...
10,276
[ 0.008742243982851505, -0.02489560842514038, 0.05621898174285889, -0.013131354004144669, -0.0009803544962778687, -0.030819706618785858, -0.0005377709167078137, -0.025255370885133743, 0.02378034219145775, 0.004739879164844751, -0.009953446686267853, -0.030196117237210274, 0.017052771523594856,...
8
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class TestBinomP(TestCase): def test_data(self): pval = stats.binom_test(100,250) assert_almost_equal(pval,0.0018833009350757682,11) pval = stats.binom_test(201,405) assert_almost_equal(pval,0.92085205962670713,11) pval = stats.binom_test([682,243],p=3.0/4) assert_al...
10,277
[ 0.01903551258146763, -0.008760346099734306, 0.04417486488819122, -0.017464999109506607, -0.02004910632967949, 0.007251093629747629, -0.05186035484075546, -0.05751865729689598, -0.003483532229438424, 0.06130571290850639, -0.02352428436279297, -0.04700401425361633, 0.03167758882045746, 0.033...
8
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class TestFindRepeats(TestCase): def test_basic(self): a = [1,2,3,4,1,2,3,4,1,2,5] res,nums = stats.find_repeats(a) assert_array_equal(res,[1,2,3,4]) assert_array_equal(nums,[3,3,2,2]) def test_empty_result(self): # Check that empty arrays are returned when there are no...
10,278
[ 0.005301395431160927, -0.01653670333325863, 0.000681829231325537, -0.04942752793431282, 0.008040123619139194, 0.02511805109679699, 0.00145739468280226, 0.0012943751644343138, 0.024166017770767212, 0.07506723701953888, 0.01540208701044321, 0.0023817154578864574, -0.01598895713686943, 0.0362...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_trimmed2(self): x = [1.2, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 100.0] y = [0.0, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5, 200.0] # Use center='trimmed' Xsq1, pval1 = stats.fligner(x, y, center='trimmed', proportiontocut=0.125) # Trim the data here, and use center='mean' Xsq2, pval2...
10,279
[ -0.0067647043615579605, 0.0018208803376182914, 0.011393890716135502, -0.026683930307626724, 0.033766619861125946, 0.011139502748847008, -0.0433262400329113, -0.028223644942045212, 0.014326043426990509, 0.0729958787560463, 0.009104401804506779, -0.004632533527910709, -0.01665569841861725, 0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class TestFligner(TestCase): def test_data(self): # numbers from R: fligner.test in package stats x1 = np.arange(5) assert_array_almost_equal(stats.fligner(x1,x1**2), (3.2282229927203536, 0.072379187848207877), 11) def test_trimmed1(self): # Test that...
10,280
[ 0.09297609329223633, -0.024955162778496742, -0.020758498460054398, 0.0015315950149670243, -0.006757128518074751, 0.004084253218024969, -0.004733737092465162, -0.010691501200199127, 0.01853526569902897, 0.013764058239758015, 0.01997162401676178, -0.008043605834245682, 0.007687638979405165, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_mood_order_of_args(self): # z should change sign when the order of arguments changes, pvalue # should not change np.random.seed(1234) x1 = np.random.randn(10, 1) x2 = np.random.randn(15, 1) z1, p1 = stats.mood(x1, x2) z2, p2 = stats.mood(x2, x1) a...
10,281
[ 0.05651431903243065, -0.036417633295059204, -0.00978647731244564, -0.018160097301006317, 0.009256655350327492, 0.024237822741270065, -0.003882314544171095, -0.03646635264158249, 0.027794327586889267, 0.0257481187582016, 0.011759607121348381, -0.039876699447631836, 0.017441488802433014, 0.0...
13
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class TestMood(TestCase): def test_mood(self): # numbers from R: mood.test in package stats x1 = np.arange(5) assert_array_almost_equal(stats.mood(x1, x1**2), (-1.3830857299399906, 0.16663858066771478), 11) def test_mood_order_of_args(self): # z...
10,282
[ 0.05986177176237106, -0.036286767572164536, -0.011078478768467903, 0.006583781912922859, -0.0022821666207164526, 0.024549908936023712, 0.02901928499341011, -0.04304780438542366, 0.0298295971006155, 0.03555242344737053, -0.0002866556460503489, -0.020776895806193352, 0.0017076684162020683, 0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_mood_2d(self): # Test if the results of mood test in 2-D case are consistent with the # R result for the same inputs. Numbers from R mood.test(). ny = 5 np.random.seed(1234) x1 = np.random.randn(10, ny) x2 = np.random.randn(15, ny) z_vectest, pval_vectes...
10,283
[ 0.058954425156116486, -0.05016297474503517, -0.016713157296180725, -0.00675225630402565, 0.011541715823113918, 0.011071584187448025, -0.01878173276782036, -0.050727132707834244, 0.07597316801548004, 0.034343067556619644, -0.012975615449249744, -0.030041370540857315, 0.002359469886869192, 0...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_mood_with_axis_none(self): #Test with axis = None, compare with results from R x1 = [-0.626453810742332, 0.183643324222082, -0.835628612410047, 1.59528080213779, 0.329507771815361, -0.820468384118015, 0.487429052428485, 0.738324705129217, 0.575781351653492, ...
10,284
[ 0.036680132150650024, -0.048709239810705185, 0.0021149739623069763, -0.0016780851874500513, 0.0020563104189932346, 0.009484963491559029, 0.02069895714521408, -0.017080344259738922, 0.019315732643008232, -0.0016364031471312046, 0.005431006196886301, -0.016993893310427666, 0.02402116358280182,...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_mood_3d(self): shape = (10, 5, 6) np.random.seed(1234) x1 = np.random.randn(*shape) x2 = np.random.randn(*shape) for axis in range(3): z_vectest, pval_vectest = stats.mood(x1, x2, axis=axis) # Tests that result for 3-D arrays is equal to that for...
10,285
[ 0.023136965930461884, -0.009039080701768398, 0.02045348845422268, -0.017564577981829643, -0.019002612680196762, -0.03697805851697922, -0.008917104452848434, -0.006631655152887106, 0.014842581935226917, 0.042678844183683395, 0.009982791729271412, -0.006512889172881842, -0.004680035635828972, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_basic(self): np.random.seed(12345) x = stats.norm.rvs(size=20) osm, osr = stats.probplot(x, fit=False) osm_expected = [-1.8241636, -1.38768012, -1.11829229, -0.91222575, -0.73908135, -0.5857176, -0.44506467, -0.31273668, -0.1856892...
10,286
[ 0.02365514263510704, -0.003415002953261137, 0.028422050178050995, -0.028601450845599174, -0.025679796934127808, -0.04021117836236954, -0.006170071195811033, -0.008406161330640316, 0.042030803859233856, 0.026294881477952003, 0.007848740555346012, -0.03716138377785683, 0.0009114149725064635, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_sparams_keyword(self): np.random.seed(123456) x = stats.norm.rvs(size=100) # Check that None, () and 0 (loc=0, for normal distribution) all work # and give the same results osm1, osr1 = stats.probplot(x, sparams=None, fit=False) osm2, osr2 = stats.probplot(x, spa...
10,287
[ 0.013618208467960358, -0.027765147387981415, 0.016865158453583717, -0.027344875037670135, -0.007917405106127262, -0.039858169853687286, -0.013225049711763859, -0.011550734750926495, 0.0014980706619098783, 0.021108562126755714, 0.03188653662800789, 0.00041561294347047806, 0.004375586751848459...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_plot_kwarg(self): np.random.seed(7654321) fig = plt.figure() fig.add_subplot(111) x = stats.t.rvs(3, size=100) res1, fitres1 = stats.probplot(x, plot=plt) plt.close() res2, fitres2 = stats.probplot(x, plot=None) res3 = stats.probplot(x, fit=False,...
10,288
[ 0.02192872017621994, -0.030723536387085915, 0.059674110263586044, -0.017286362126469612, -0.014591929502785206, -0.015303446911275387, -0.010935199446976185, 0.01651652529835701, -0.014941856265068054, 0.046306923031806946, 0.014743564650416374, 0.041804537177085876, -0.018744388595223427, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_moments_normal_distribution(self): np.random.seed(32149) data = np.random.randn(12345) moments = [] for n in [1, 2, 3, 4]: moments.append(stats.kstat(data, n)) expected = [0.011315, 1.017931, 0.05811052, 0.0754134] assert_allclose(moments, expected, ...
10,289
[ -0.009242205880582333, -0.002256746171042323, 0.03802648186683655, -0.008547348901629448, 0.0028486039955168962, 0.015237648971378803, -0.04830789566040039, -0.010822542943060398, 0.014327570796012878, 0.04439702257514, 0.027892645448446274, -0.019000941887497902, 0.011554294265806675, 0.0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class TestKstat(TestCase): # Note: `kstat` still needs review. Statistics Review issue gh-675. def test_moments_normal_distribution(self): np.random.seed(32149) data = np.random.randn(12345) moments = [] for n in [1, 2, 3, 4]: moments.append(stats.kstat(data, n)) ...
10,290
[ -0.008199444971978664, -0.02751491591334343, 0.027245881035923958, -0.03502343222498894, 0.0419205017387867, -0.005668072495609522, -0.02614528499543667, -0.0019077007891610265, 0.040917735546827316, 0.0555679015815258, 0.020691215991973877, -0.005588585045188665, 0.027735035866498947, 0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_2d_input(self): # Note: boxcox_llf() was already working with 2-D input (sort of), so # keep it like that. boxcox() doesn't work with 2-D input though, due # to brent() returning a scalar. np.random.seed(54321) x = stats.norm.rvs(size=100, loc=10) lmbda = 1 ...
10,291
[ -0.020174527540802956, -0.035903818905353546, 0.02204299159348011, 0.000742271775379777, 0.044061560183763504, -0.008774453774094582, -0.04501410946249962, -0.0125663373619318, 0.03150743246078491, 0.039982687681913376, 0.0069120959378778934, -0.02176211215555668, 0.029309241101145744, 0.0...
12
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class TestBoxcox_llf(TestCase): def test_basic(self): np.random.seed(54321) x = stats.norm.rvs(size=10000, loc=10) lmbda = 1 llf = stats.boxcox_llf(lmbda, x) llf_expected = -x.size / 2. * np.log(np.sum(x.std()**2)) assert_allclose(llf, llf_expected) def test_arr...
10,292
[ -0.011870821006596088, -0.045936599373817444, 0.02693812921643257, 0.0032850983552634716, 0.016936220228672028, -0.000944928964599967, -0.03513557091355324, -0.002444087527692318, 0.05217490345239639, 0.04052319377660751, 0.021962953731417656, -0.024618098512291908, 0.01526064332574606, 0....
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class TestBoxcox(TestCase): def test_fixed_lmbda(self): np.random.seed(12345) x = stats.loggamma.rvs(5, size=50) + 5 xt = stats.boxcox(x, lmbda=1) assert_allclose(xt, x - 1) xt = stats.boxcox(x, lmbda=-1) assert_allclose(xt, 1 - 1/x) xt = stats.boxcox(x, lmb...
10,293
[ 0.0009351136977784336, -0.0438251718878746, 0.030185436829924583, -0.008554286323487759, -0.015184348449110985, -0.0317300520837307, 0.00324794533662498, 0.011270451359450817, 0.05455893650650978, 0.04317067191004753, 0.020957019180059433, -0.009981091134250164, 0.003769907169044018, 0.024...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_fixed_lmbda(self): np.random.seed(12345) x = stats.loggamma.rvs(5, size=50) + 5 xt = stats.boxcox(x, lmbda=1) assert_allclose(xt, x - 1) xt = stats.boxcox(x, lmbda=-1) assert_allclose(xt, 1 - 1/x) xt = stats.boxcox(x, lmbda=0) assert_allclose(xt,...
10,294
[ 0.03531639650464058, -0.027172600850462914, 0.051550764590501785, -0.018975578248500824, -0.01996028609573841, -0.029301699250936508, 0.0011119542177766562, -0.004357995465397835, 0.02946138195693493, 0.03124449960887432, 0.01626097969710827, -0.0030655672308057547, -0.02900894731283188, 0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_alpha(self): np.random.seed(1234) x = stats.loggamma.rvs(5, size=50) + 5 # Some regular values for alpha, on a small sample size _, _, interval = stats.boxcox(x, alpha=0.75) assert_allclose(interval, [4.004485780226041, 5.138756355035744]) _, _, interval = stats...
10,295
[ 0.023986799642443657, -0.04071752727031708, 0.05747435614466667, -0.012136955745518208, -0.0030717591289430857, -0.025252697989344597, -0.007706314325332642, 0.03265232592821121, 0.039595186710357666, 0.04139615222811699, 0.011060290038585663, -0.015047214925289154, -0.03166048973798752, 0...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_lmbda_None(self): np.random.seed(1234567) # Start from normal rv's, do inverse transform to check that # optimization function gets close to the right answer. np.random.seed(1245) lmbda = 2.5 x = stats.norm.rvs(loc=10, size=50000) x_inv = (x * lmbda + 1)*...
10,296
[ 0.0021683424711227417, 0.006243464536964893, 0.028898851945996284, -0.004154055379331112, 0.014164647087454796, 0.0014687773073092103, -0.013471272774040699, -0.009026248008012772, 0.014077975414693356, 0.021147917956113815, -0.002502647927030921, -0.013743669725954533, -0.019563062116503716...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class TestBoxcoxNormmax(TestCase): def setUp(self): np.random.seed(12345) self.x = stats.loggamma.rvs(5, size=50) + 5 def test_pearsonr(self): maxlog = stats.boxcox_normmax(self.x) assert_allclose(maxlog, 1.804465, rtol=1e-6) def test_mle(self): maxlog = stats.boxco...
10,297
[ -0.00012591063568834215, -0.0041404422372579575, 0.013356265611946583, 0.005132622085511684, 0.02037784457206726, 0.0054506282322108746, -0.034700848162174225, -0.03520965948700905, 0.02507161907851696, 0.026966936886310577, -0.014462927356362343, -0.013190901838243008, 0.004782814998179674,...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class TestBoxcoxNormplot(TestCase): def setUp(self): np.random.seed(7654321) self.x = stats.loggamma.rvs(5, size=500) + 5 def test_basic(self): N = 5 lmbdas, ppcc = stats.boxcox_normplot(self.x, -10, 10, N=N) ppcc_expected = [0.57783375, 0.83610988, 0.97524311, 0.9975605...
10,298
[ 0.009762303903698921, -0.02445506490767002, 0.012979426421225071, -0.02590954862535, 0.0009498832514509559, 0.03384758532047272, -0.03278753533959389, -0.034710414707660675, 0.04844173416495323, 0.05098092183470726, 0.029138997197151184, -0.024516694247722626, -0.016541682183742523, 0.0720...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class TestCircFuncs(TestCase): def test_circfuncs(self): x = np.array([355,5,2,359,10,350]) M = stats.circmean(x, high=360) Mval = 0.167690146 assert_allclose(M, Mval, rtol=1e-7) V = stats.circvar(x, high=360) Vval = 42.51955609 assert_allclose(V, Vval, rtol=...
10,299
[ -0.0035129552707076073, 0.0020564778242260218, 0.003292229725047946, -0.004768914543092251, 0.026114003732800484, 0.032679811120033264, -0.049442511051893234, -0.023291204124689102, 0.012895343825221062, 0.011993788182735443, 0.024646645411849022, -0.029968926683068275, 0.004653888288885355,...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_plot_kwarg(self): # Check with the matplotlib.pyplot module fig = plt.figure() fig.add_subplot(111) stats.boxcox_normplot(self.x, -20, 20, plot=plt) plt.close() # Check that a Matplotlib Axes object is accepted fig.add_subplot(111) ax = fig.add_s...
10,300
[ 0.015048051252961159, -0.0018392063211649656, 0.019420988857746124, -0.03529218211770058, -0.008044919930398464, 0.016424240544438362, -0.03320860490202904, -0.010417881421744823, 0.06050088256597519, 0.04864250496029854, 0.051369160413742065, -0.013376045972108841, -0.035883814096450806, ...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_circfuncs(self): x = np.array([355,5,2,359,10,350]) M = stats.circmean(x, high=360) Mval = 0.167690146 assert_allclose(M, Mval, rtol=1e-7) V = stats.circvar(x, high=360) Vval = 42.51955609 assert_allclose(V, Vval, rtol=1e-7) S = stats.circstd(x,...