Skip to content

Very short testing defs for a variety of purposes. This is where the interesting bits go that you have no immediate use for...but you just have to keep them.

Notifications You must be signed in to change notification settings

Dan-Patterson/test_samples

Repository files navigation

Test_samples

Very short testing defs for a variety of purposes

:Table of contents
:

Testing_Script_01
:Arrays....

:...... construction .....
: num_01() Array creation using vstack, zip and array filling
: num_02() Using np.linspace with floats instead of np.arange
: num_03() sparse array
: num_04() Sub-dtypes in numpy and array formulation
: num_05() recarray access in numpy

:...... altering ......
: num_06() Changing array types via rounding etc
: num_07() Flatten an array
: num_08() Array size information
: num_09() Transposing 3D arrays
: num_10() Array slicing using the ellipse
: num_11() Slicing arrays
: num_12() Sorting an array
: num_13() Sorting an array revisited (see # 12)
: num_14() Array padding example

:...... working with array data ......
: num_15() Subtracting an array mean and the array
: num_16() Unique values for 1D and 2D arrays
: num_17() Striding arrays demo
: num_18() Condition checking and useage now in numpy.
: num_19() Using linalg, einsum, distance and timing
: num_20() Using fromiter, unique and histo all at once.
: num_21() Rearranging, deleting rows and columns using slicing
: num_22() Reclass arrays
: num_23() Block statistics
: num_24() Concatenate arrays
:
:...... python ......
: py_01() List comprehension formats
: py_02() List comprehensions alternate outputs
: py_03() formatting output with textwrap
:

...... matplotlib ......
: mpl_01() Plotting and interpolating
: mpl_02() Construct rectangular geometries

Testing_script_02

:...... np functions .....
: num_25() Numpy typecheck for array data types
: num_26() masks, nan and data outputs
: num_27() list files in folder
: num_28() place random values/nan in arrays
: num_29() remove string entities using LC's
: num_30() encoding and decoding in python
: num_31() masked_array formatting
: num_32() 2D array to XYZ
: num_33() nested formatting demos
: num_34() Structured arrays
: num_35() math on structured arrays
: num_36() char and recarray construction
: num_37() playing with 3D arrangements...
: num_38() combinations in data
: num_39() recfunctions join
:
Testing_script_03

:...... np functions .....
: num_40() np.genfromtext example
: : num_41() Documenting code using inspect
: num_42() list files in folder
: num_43() Blocking an array
: num_44() a variant on array_split
: num_45() bulk create structured array fields
: num_46() Masked array from ill-formed list
: num_47() Block with padding and reshaping
: num_48() Formatting again, using indent and dedent
: num_49() kroneker product and array construction
: num_50() fancy indexing ....
: num_52() Closeness Manahatten
: num_53() formatting output
: num_54() Producing uniform distribution data
: num_55() combinations and frequency

Testing_script_04

: num_56() Geometric mean calculation
: num_57() transposing and reshaping arrays
: num_58() arrays from uneven lists
: num_59() advanced slicing
: num_60() subtraction between arrays and transposed arrays
: num_61() Unravel indices
: num_62() Products of various kinds
: num_63() quick length/distance demo using row norms from scipy
: num_64() mixing dtypes in arrays
: num_65() index array and booleans
: num_66() savetxt example...
: num_67() datetime operations
: num_68() local minima demo
: num_69() as_strided useage
: num_70() unique on recarrays

Testing_script_05

:...... np functions .....

: num_71() # slicing and remainders
: num_72() # logical_or and range checking
: num_73() # slicing in structured arrays by condition
: num_74() # Load *.npy files
: num_75() # make random3darrays wth a predetermined shape
: num_76() # produce row/column indices from triu
: num_77() # 2.7 indent function
: num_78() # logical_or, condition checking
: num_79() # bad floating point comparisons

: num_80() # using r_ and c_ for rapid indexing and array construction
: num_81() # sorting arrays by column, revisited
: num_82() # line indentation options
: num_83() # PIL testing
: num_84() # mandelbrot demo
: num_85() # circle search
: num_86() # standardize by rows or columns

Testing_script_06

:   num_86() # standardize by rows or columns
:   num_87() # Unique in 3d array
: num_88() # nested recarrays
: num_89() # reshape array to row format
: num_90() # sorting two dimensional arrays, lexsort etc
: num_91() # smallest 'x' values in 2D numpy array
: num_92() # gray scale image from rgb
: num_93() # convolve 2d array a with kernel
: num_94() # many plots on screen
: num_95() # working with dates
: num_96() # n smallest in column in sorted order
: num_97() # running 2d maximum
: num_98() # Decimal minute to decimal degree convertor
: num_99() # Decimal, minutes, seconds to decimal degree convertor
: num_100() # degrees, min, sec in separate fields to decimal degrees

Testing_script_07

: num_101() # sum product, einsum by axis
: num_102() # Structured to ndarray dems
: num_103() # sample plot
: num_104() # fancy slicing
: num_105() # distance calculation, with large arrays
: num_106() # reset counter demo
: num_107() # 2D argmax use
: num_108() # voxel in matplot lib... not available yet
: num_109() # raster band math demo
: num_110() # Where or where is....

Testing_script_08

: num_111() # create distance matrix as feature class
: num_112() # os.path information
: num_113() # sequential counts for attributes
: num_114() # heat map by sampling and bucketing
: num_115() #
: num_116() # form array patterns
: num_117() # Using a searchcursor in the field calculator
: num_118() # using random.mrand.RandomState
: num_119() # Equation of a plane through 3 points
: num_120() #

About

Very short testing defs for a variety of purposes. This is where the interesting bits go that you have no immediate use for...but you just have to keep them.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages