biocore/scikit-bio — pull request #475 by ElBrogrammer (2014-06-24 15:33:19+00:00)
Title: Remove skbio.util.sort in favor of natsort package

Removed `skbio.util.sort` in favor of the [natsort](https://pypi.python.org/pypi/natsort) package. This change only affects `skbio.math.gradient`. Fixes #464.

The natural sorting algorithm that's used now is case-sensitive, respects sign and decimal points, and works with exponential notation (like the previous function did). See the [natsort](https://pypi.python.org/pypi/natsort) package for more details.

There are some differences in behavior between the sorting functions, for example:

```python
# new behavior
natsorted(['a10', 'a-10'])
['a-10', 'a10']

# old behavior
signed_natsort(['a10', 'a-10'])
['a10', 'a-10']
```

The new behavior is what I'd expect, but I'm not very familiar with the gradient/trajectory code and what sort of effect this change in behavior might have. The existing unit tests weren't testing natural sorting because using the builtin `sorted` allowed the tests to still pass. I added a couple new tests and am happy to add more if there are other cases that should be tested.

@josenavas @ElDeveloper @antgonza can one of you please review since you've worked with the gradient code?