In [1]:
from ahh import exp, ext
import numpy as np
In [2]:
arr_1d = exp.arr_1d(5) # simple increasing incrementally 5 values 1-dimensional array
print(arr_1d) # reference
ext.ahh(arr_1d); # most simple usage, the semi-colon is just to suppress unnecessary output in Jupyter notebooks
In [3]:
arr_1d = exp.arr_1d(5) # simple increasing incrementally 5 values 1-dimensional array
print(arr_1d) # reference
ext.ahh(arr_1d, quiet=True); # only print summary without the edge snippet
In [4]:
x = exp.arr_1d() # x array
ext.ahh(x, n='x') # name the output, method one
ext.ahh(x=x) # method two
Out[4]:
Out[4]:
In [18]:
x = exp.arr_1d() # x array
y = exp.arr_1d(y=True) # y array
z = exp.arr_1d(y=True, neg=True) # y array
ext.ahh(x=x, y=y, z=z) # explore multiple arrays
Out[18]:
In [6]:
ext.ahhh(x, y, z, arr_1d=arr_1d) # can pass as many variables to ahhh but may not change the settings
In [7]:
arr_1d = exp.arr_1d(10, y=True) # simple 10 values random array
stop = False # preparation
for i in range(10000): # 10000 iterations
stop = ext.ahh(arr_1d, stop=stop) # stop spamming the screen after first iteration
In [8]:
arr_df = exp.arr_df() # open a dataframe
ext.ahh(arr_df, col='tmpf', ignore='M'); # select column and ignore a string
In [9]:
arr_ds = exp.arr_ds() # open a dataset
print(arr_ds) # for reference
ext.ahh(arr_ds, center=15); # print the 15 values in the center
In [10]:
arr_1d = exp.arr_1d(10, y=True) # simple 10 values random array
print(arr_1d) # for reference
ext.ahh(arr_1d, precision=5); # print more decimal values
In [11]:
arr_1d = exp.arr_1d(100, y=True) # 100 values (long) array
print(arr_1d) # for reference
ext.ahh(arr_1d, edgeitems=10); # print the first and last 10 values of the array
In [12]:
arr_1d = exp.arr_1d(20, y=True) # 20 values (long) array
for i, val in enumerate(arr_1d):
print(i, val)# for reference, print index and value
ext.ahh(arr_1d, center=5, snippet=False); # print the center of array, but not the edge
In [13]:
arr_1d = exp.arr_1d(5, y=True) * 99999 # really large values greater than 99999.
ext.ahh(arr_1d, fillval_high=9999999); # make min and max show a value
In [21]:
ext.ahh(ds=arr_ds, arr=x) # name=data
Out[21]:
In [ ]: