--- id: numpy-minmax version: "0.6.0" license: MIT License Copyright (c) 2024 Nomono Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the… (full text in the JSON record) license_treatment: permissive maintenance: active --- # numpy-minmax — A fast python library for finding both min and max value in a NumPy array License: permissive · Maintenance: active · Downloads: 204.1K/mo ## What it is and what it does numpy-minmax is a specialized library that computes both the minimum and maximum values of a NumPy array in a single pass using C code with AVX/AVX512 SIMD instructions. It targets the common case where you need both extrema but NumPy's separate amin and amax functions require two passes. The package is optimized for float32 arrays that are C-contiguous, F-contiguous, or 1D strided; it also handles contiguous int16 arrays. For other array layouts (strided arrays with ndim ≥ 2), it falls back to NumPy's standard functions. The library depends on numpy and cffi and is distributed as compiled wheels for Python 3.10–3.14 across macOS (ARM64), Linux (x86_64, aarch64, musllinux variants), and Windows. It is actively maintained, with the latest release 49 days old, and carries no known security vulnerabilities. The project originated at Nomono, an audio AI startup, and is used for audio processing but applies to any float32 workload where both extrema are needed. Use it for: - Audio signal processing pipelines that need to normalize or clip audio samples by finding their dynamic range in one operation. - Real-time data streaming where you compute min/max statistics on fixed-size buffers for monitoring or scaling. - Scientific computing workflows that repeatedly compute both extrema on large float32 arrays and need lower latency. - Batch image or signal processing where normalization to [0, 1] or [-1, 1] requires both bounds simultaneously. - Performance-critical loops in numerical simulations where the overhead of two separate NumPy calls is measurable. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Finds the minimum and maximum values in a NumPy array using C and SIMD optimizations, delivering faster results than separate NumPy amin and amax calls. Yes, if you have a workload that repeatedly computes both min and max on float32 NumPy arrays and latency matters. The package is actively maintained, has no security issues, carries a permissive MIT license, and offers a documented performance advantage. Install friction is moderate due to compilation, but wheels are available for common platforms and Python versions. Not worth installing if you rarely need both extrema together or if your arrays are primarily int16 or non-contiguous. ## Install pip install numpy-minmax uv add numpy-minmax poetry add numpy-minmax ## Installing numpy-minmax Before you install: Medium install friction due to compiled C extensions with cffi and numpy dependencies. The package is actively maintained with a recent release and broad platform coverage (macOS, Linux, Windows across multiple architectures and Python versions 3.10–3.14). License in practice: MIT License permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects. Quickstart: pip install numpy-minmax import numpy_minmax import numpy as np arr = np.arange(1337, dtype=np.float32) min_val, max_val = numpy_minmax.minmax(arr) Requires numpy and cffi as runtime dependencies; C compiler needed at install time. Verify before relying: - Whether the 2.3x speedup claim holds across different CPU architectures and numpy versions beyond 1.24–1.26. - Performance characteristics for int16 arrays and the exact conditions triggering fallback to numpy.amin/amax. - Compatibility with non-standard array layouts or memory-mapped arrays. ## Package facts - License: MIT License Copyright (c) 2024 Nomono Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the… (full text in the JSON record) (permissive) - Python support: unspecified - Install friction: medium - Maintenance: active - Downloads: 204.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags numpy min max function, fast minmax array, numpy performance optimization, simd array operations, numpy float32 minmax, performance-optimization, simd, audio-processing [View on SkillFed](https://skillfed.io/packages/numpy-minmax) · [View on PyPI](https://pypi.org/project/numpy-minmax/)