Skip to content

paulxshen/Porcupine.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Porcupine.jl

Collection of Julia hacks for optimizing developer happiness and automatic differentiation. Most features are implemented as method overloads which are implicitly activated by importing the package. Features include:

  • Allows arithmetic operations (+-*/) between different types including numbers, arrays, tuples, and nested named tuples and dictionaries using recursive broadcasting.
  • Defines new operators:
    • for recursively elementwise * instead of matrix multiplication
    • for recursively elementwise / instead of matrix division
  • Allows arithmetic operations with nothing which is treated like zero. Fixes some Zygote.jl errors involving nothing tangent propagation.
  • Linear interpolation of multidimensional arrays via () syntax. Also works on ranges but only if step size is 1.
  • "Fuzzy" indexing for named tuples and dictionaries via () syntax. If exact key is not found, it will try to retrieve:
    • matching nested keys (arbitrarilly deep)
    • keys differing by Symbol vs String type
    • the ith value if the key is an integer i
  • Automatic differentiation (AD) friendly constructors
    • dict for OrderedDict
    • namedtuple for NamedTuple

Contributors

Paul Shen [email protected] Luminescent AI

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages