Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: "David N. Mashburn" Newsgroups: comp.lang.python.announce Subject: ANN: np_utils 0.4 Date: Mon, 2 Nov 2015 12:22:22 -0500 Lines: 84 Approved: python-announce-list@python.org Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de CC58QIkzxuG9Vp67Dc4N+g85oiqr3dkfKrY1ra/gaIXg== Return-Path: X-Original-To: python-announce-list@python.org Delivered-To: python-announce-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'url:pypi': 0.03; 'inspired': 0.05; 'url:bitbucket': 0.05; 'dependency': 0.07; 'indexing': 0.07; 'subject:ANN': 0.07; 'verbatim': 0.07; 'wrapper': 0.07; 'api': 0.09; 'chunks': 0.09; 'docs.': 0.09; 'grid': 0.09; 'integers': 0.09; 'optional': 0.09; 'url:github': 0.09; '(there': 0.16; 'bounds': 0.16; 'cheers!': 0.16; 'dimension': 0.16; 'docstring': 0.16; 'fancy': 0.16; 'inclusion,': 0.16; 'numpy': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'succinct': 0.16; 'integer': 0.18; 'nested': 0.18; 'algorithm': 0.20; 'fairly': 0.22; 'meant': 0.22; 'arrays': 0.22; 'needed.': 0.23; 'examples': 0.24; 'module': 0.25; 'header:User-Agent:1': 0.26; 'checking': 0.27; 'mostly': 0.27; 'scale': 0.27; 'change,': 0.27; 'projects,': 0.27; 'thorough': 0.27; 'specifically': 0.28; 'function': 0.28; 'values': 0.28; 'skip:( 20': 0.28; 'record': 0.29; 'regular': 0.29; 'extending': 0.29; 'itself,': 0.29; 'novel': 0.29; 'array': 0.29; 'handled': 0.29; 'connection': 0.30; 'code': 0.30; 'connections': 0.30; 'operations': 0.31; 'certain': 0.31; 'option': 0.31; 'included': 0.32; 'functional': 0.32; 'point': 0.33; 'useful': 0.33; 'url:python': 0.33; 'common': 0.33; 'utility': 0.33; 'message-id:@gmail.com': 0.34; 'add': 0.34; 'lists': 0.34; 'received:google.com': 0.35; 'growing': 0.35; 'could': 0.35; 'generic': 0.35; 'skip:* 20': 0.35; 'stable': 0.35; 'level': 0.35; 'supports': 0.35; 'unit': 0.35; 'but': 0.36; 'list,': 0.36; 'project': 0.36; 'there': 0.36; 'url:org': 0.36; 'lines': 0.36; 'received:209.85': 0.36; 'subject:: ': 0.37; 'skip:& 10': 0.37; 'doing': 0.38; 'version': 0.38; 'received:209': 0.38; 'end': 0.39; 'test': 0.39; 'easily': 0.39; 'received:192': 0.39; 'build': 0.40; 'to:addr:python.org': 0.40; 'collection': 0.60; '&': 0.61; 'skip:n 10': 0.62; 'relatively': 0.63; 'due': 0.65; 'between': 0.65; 'benefit': 0.66; 'subject': 0.70; 'heavy': 0.81; '*new': 0.84; 'circles': 0.84; 'remained': 0.84; 'announcing': 0.91; 'thoroughly': 0.91; 'many,': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=to:from:subject:message-id:date:user-agent:mime-version :content-type; bh=T1Gu8MkciN8Qch0PF0LfpbFJYo8UE+4B/4c9CapzdLY=; b=gpteJcXG7R9Nmm9HuFa9frSHYlSHMUEx4x586FHMpR0wdUw4yZs623FLQNWycfc9fu bu3Bf6NgB0zSJQN3XsjNjwXCxW5NhAcKD/Sq/FzrYbzbupMRYLaGbgzUuP2lm/VoDT+A ExMbpkWl312PxlkM+Bi6jTOo/1uwYkZkf5K+FMu9/7rcD5uHCv5MRuqMd7xadnY5ijdw QRvbRg3TFZOeZnrhaOlb7XsRfE7gDcAKbLs+ygKWsobry85LLC2YHinzRAuWnYwGDjK7 TtYQgP5JMK08eF01CCrmZxNmaNsZRHwbqfGD+kJoKWwzyoMGyRbGZ4QMUKKhHIjNcKe9 HAcw== X-Received: by 10.129.75.131 with SMTP id y125mr11285410ywa.48.1446484944249; Mon, 02 Nov 2015 09:22:24 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 X-Mailman-Approved-At: Mon, 02 Nov 2015 15:12:28 -0500 X-Content-Filtered-By: Mailman/MimeDel 2.1.20+ X-BeenThere: python-announce-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: Announcement-only list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python.announce:1910 Announcing np_utils version 0.4 Github: https://github.com/davidmashburn/np_utils Bitbucket: https://bitbucket.org/davidmashburn/np_utils PyPI: https://pypi.python.org/pypi/np_utils np_utils is a growing collection of succinct but powerful utility functions focused around extending numpy in important ways, but also includes a number of useful list, functional, and general purpose utilities. Small set of highlights (there are many, many more): * *NEW in 0.4* A succinct but fast and flexible groupby implementation (np_groupby) * A wrapper around np_groupby specifically tailored to common operations on record arrays (rec_groupby) * A function to partition an array into n-sized chunks (partitionNumpy) * A function to easily build a centered grid with a certain number of steps in each dimension (build_grid) * A simple n-dimensional interpolation system for arrays that lines up with standard indexing when integers are passed (interpNumpy) * A one-liner to make a new nd-array and paste in values from an existing nd-array with an offset (shapeShift) * A function to add a border to an array (addBorder) * A function to scale an nd-array by integer multiples, like an image up-scale (shape_multiply) * A utility to enable numpy-like fancy indexing to regular lists, including jagged nested lists (fancyIndexingList, fL for short) * A "flatten" function for nested lists (flatten) * A "deletecases" function for lists * A groupby for regular lists (groupByFunction) * Tools for analyzing connections and connection chains in lists (getElementConnections, getChainsFromConnections) * An interpolation function for lists (interp) * Functions for deep operations on nested lists (listAdd, listMul, etc) * A generic slice generator supporting every option imaginable: 0- and 1- based indexing, optional end point inclusion, strict/liberal bounds checking * Functional utilities like compose, identity, docAppend, conversion between splat and non-splat (convertToSingleArgFun & convertToMultiArgFun), and even an implementation of Jsoftware's "fork" * "Drawing" functions for ND-arrays: - Hyper-rectangles (NDRectangle) - ND Bresenham lines -lines to ND-arrays (BresenhamFunction) - Circles and Spheres (ImageCircle, ImageSphere) - A novel ND-Bresenham *triangular-plane*-drawing algorithm (BresenhamTriangle) supporting one of my other projects, SWS4D * Many others! Documentation is handled at the docstring level and is thorough with included examples, but there is little in the way of over-arching docs. The only dependency is numpy itself, and functions are meant to be relatively independent so that other projects can cherry-pick them as needed. The API is always subject to change, but has remained fairly stable -- mostly due to my own heavy dependence on the module A unit test suite is in progress, thoroughly covering a small but important set of the functions (notably groupby, build_grid, partitionNumpy). A number of functions have been inspired or taken verbatim from excellent examples on StackOverflow -- in these cases, links are provided. Suggestions are welcome and encouraged! (algorithms, style, code organization, documentation, projects that could benefit from some/ all of these functions, inclusions, mergers, etc) This project supports work that I did at Vanderbilt University and am doing at Pluralsight, LLC. Cheers! -David Mashburn

np_utils 0.4 - a growing collection of succinct but powerful utility functions focused around extending numpy in important ways, but also includes a number of useful list, functional, and general purpose utilities. (02-Nov-15)