This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy | |
import math | |
import random | |
def generate_positions(n): | |
positions = [] | |
for i in range(n): | |
positions.append((random.random(), random.random(), random.random())) | |
return positions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"path": "yt/arraytypes.py", | |
"line": 7, | |
"func_name": "blankRecordArray", | |
"type_comments": [ | |
"(Dict[str, List[str]], int) -> numpy.recarray" | |
], | |
"samples": 310 | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"g": [ | |
1, | |
"Symbol('(mass)', positive=True)", | |
0, | |
"\\rm{g}" | |
], | |
"s": [ | |
1, | |
"Symbol('(time)', positive=True)", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import yt | |
import yaml | |
my_obj = yaml.load(open("what_want_to_do.yml")) | |
i = 0 | |
for dataset_filename in my_obj['dataset']: | |
ds = yt.load(dataset_filename) | |
for projection in my_obj['projection_plots']: | |
for axis in projection['axes']: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title": "FieldDefinition", | |
"type": "object", | |
"properties": { | |
"validators": { | |
"title": "Validators", | |
"default": [], | |
"type": "array", | |
"items": { | |
"anyOf": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> oa['grid_left_edges'] - on['grid_left_edges'] | |
unyt_array([[-3.05474414e+24, -3.05474414e+24, -3.05474414e+24], | |
[-3.05474414e+24, -3.05474414e+24, -3.05474414e+24], | |
[-3.05474414e+24, -3.05474414e+24, -3.05474414e+24], | |
..., | |
[ 2.29105810e+24, 1.52737207e+24, 2.29105810e+24], | |
[ 1.52737207e+24, 2.29105810e+24, 2.29105810e+24], | |
[ 2.29105810e+24, 2.29105810e+24, 2.29105810e+24]], 'code_length') | |
>>> on['grid_left_edges'] | |
unyt_array([[-3.08560014e+24, -3.08560014e+24, -3.08560014e+24], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pooch | |
for line in open("registry.txt"): | |
name, sha, url = line.split() | |
registry[name] = sha | |
urls[name] = url | |
GOODBOY = pooch.create( | |
# This is still the default in case the environment variable isn't defined | |
path=pooch.os_cache("yt"), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[success] 3.60% yt.frontends.athena_pp.tests.test_outputs.FieldValues_AM06_out1_00400_all_velocity_magnitude: 20.1119s | |
[success] 3.46% yt.frontends.athena_pp.tests.test_outputs.FieldValues_AM06_out1_00400_sphere_('max', (0_1, 'unitary'))_velocity_magnitude: 19.3312s | |
[success] 2.73% yt.frontends.athena_pp.tests.test_outputs.ProjectionValues_AM06_out1_00400_sphere_('max', (0_1, 'unitary'))_velocity_magnitude_0_density: 15.2401s | |
[success] 2.72% yt.frontends.athena_pp.tests.test_outputs.ProjectionValues_AM06_out1_00400_sphere_('max', (0_1, 'unitary'))_velocity_magnitude_2_density: 15.2296s | |
[success] 2.72% yt.frontends.athena_pp.tests.test_outputs.ProjectionValues_AM06_out1_00400_sphere_('max', (0_1, 'unitary'))_velo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"density": [ | |
[ | |
3.676411957510513e-27, | |
4.233186247069095e-27, | |
4.7960308251482965e-27, | |
5.211452721200936e-27, | |
5.5704058574457245e-27, | |
5.968494805162153e-27, | |
6.3183200611758625e-27, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
====================================================================== | |
ERROR: test_derived_field (yt.data_objects.tests.test_data_containers.TestDataContainers) | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/home/matthewturk/yt/yt/yt/data_objects/tests/test_data_containers.py", line 134, in test_derived_field | |
ds = fake_particle_ds() | |
File "/home/matthewturk/yt/yt/yt/testing.py", line 303, in fake_particle_ds | |
ds = load_particles(data, 1.0, bbox=bbox, over_refine_factor = over_refine_factor) | |
TypeError: load_particles() got an unexpected keyword argument 'over_refine_factor' |