{"categories":[{"label":"Mathematics","url":"https://skillfed.io/packages/category/scientific-engineering-mathematics/2"}],"enrichment":{"capability":"Snuggs evaluates s-expressions (Lisp-like syntax) that operate on NumPy arrays and scalars, letting you write array computations as nested function calls rather than Python code.","skillfed_tags":["dsl","expression-evaluation","lisp-syntax"],"use_cases":["Accept user-provided mathematical expressions as strings and evaluate them against NumPy arrays without parsing Python code.","Serialize array computations as s-expressions for storage, transmission, or later evaluation.","Write simple calculator-style programs that combine NumPy functions with arithmetic and logical operators.","Build domain-specific languages or configuration systems that need to express array transformations functionally.","Prototype numerical algorithms using Lisp-like syntax before translating to optimized Python or compiled code."],"what_it_does":"Snuggs is a small expression evaluator that lets you write NumPy computations using Lisp-like s-expression syntax instead of Python. You pass a string like `(+ 1 2)` or `(mean (asarray 1 2 4))` to snuggs.eval(), and it parses and executes the expression, returning the result. It wraps NumPy functions and operators (arithmetic, logical, and higher-order functions like map and partial) in a functional, parenthesis-heavy syntax.\n\nThe main use case is writing simple, expression-based array calculations\u2014particularly useful when you need to serialize computations as strings or accept user-provided formulas as input. It supports passing NumPy arrays as named context variables, so expressions can reference external data. The package is lightweight (only numpy and pyparsing as dependencies) and has no known security vulnerabilities, but performance is not optimized; the documentation explicitly notes it lacks the multithreading and temporary-elimination optimizations of libraries like numexpr.","worth_installing":"Yes, if you need to evaluate user-supplied or serialized array expressions safely and don't require high performance. The low install friction, permissive license, and lack of vulnerabilities make it a straightforward choice for expression-based workflows. Not recommended if you need optimized array computation; use numexpr or raw NumPy instead."},"id":"snuggs","links":{"html":"https://skillfed.io/packages/snuggs","md":"https://skillfed.io/packages/snuggs.md","pypi":"https://pypi.org/project/snuggs/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2019-09-18","license_spdx":null,"license_treatment":"permissive","name":"snuggs","python_support":"unspecified","summary":"Snuggs are s-expressions for Numpy"},"popularity":{"monthly_downloads":560186,"position":6005,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"1.4.7"}
