[Numpy-svn] [numpy/numpy] 2da0d2: ENH: make random.choice size argument default to N...

GitHub noreply@github....
Thu Dec 13 16:20:08 CST 2012


  Branch: refs/heads/master
  Home:   https://github.com/numpy/numpy
  Commit: 2da0d2288667202ff489ba7b922b534ca98768f3
      https://github.com/numpy/numpy/commit/2da0d2288667202ff489ba7b922b534ca98768f3
  Author: Sebastian Berg <sebastian@sipsolutions.net>
  Date:   2012-12-06 (Thu, 06 Dec 2012)

  Changed paths:
    M numpy/random/mtrand/mtrand.pyx

  Log Message:
  -----------
  ENH: make random.choice size argument default to None and allow tuple

The size argument to random.choice should work like it does for all
other functions in random as well.


  Commit: 7b10fc90097c514e24cd477af5c1e47349d1c0ac
      https://github.com/numpy/numpy/commit/7b10fc90097c514e24cd477af5c1e47349d1c0ac
  Author: Sebastian Berg <sebastian@sipsolutions.net>
  Date:   2012-12-06 (Thu, 06 Dec 2012)

  Changed paths:
    M numpy/random/mtrand/mtrand.pyx

  Log Message:
  -----------
  BUG: Do not sort new indices in random.choice.

Random choice used np.unique to find new indices when replace
was False and p given. This is wrong since unique will sort the
indices. This solves the bug, but likely not ideal.


  Commit: 3e5b9b2366607bc3d85b60c34b370327e491e1ef
      https://github.com/numpy/numpy/commit/3e5b9b2366607bc3d85b60c34b370327e491e1ef
  Author: Sebastian Berg <sebastian@sipsolutions.net>
  Date:   2012-12-06 (Thu, 06 Dec 2012)

  Changed paths:
    M numpy/random/mtrand/mtrand.pyx

  Log Message:
  -----------
  BUG: Fix various problems in the previous commits.

Thanks to @alan-isaac for pointing out the 0-d vs. scalar issue.


  Commit: 7f9d7bcf616371f3318513ca5500f19124f573e1
      https://github.com/numpy/numpy/commit/7f9d7bcf616371f3318513ca5500f19124f573e1
  Author: Sebastian Berg <sebastian@sipsolutions.net>
  Date:   2012-12-06 (Thu, 06 Dec 2012)

  Changed paths:
    M numpy/random/tests/test_random.py

  Log Message:
  -----------
  TST: Add tests for new feature and fix in random.choice


  Commit: 24a1bcdcef3ce15f43402d36c8efa077777a8a4c
      https://github.com/numpy/numpy/commit/24a1bcdcef3ce15f43402d36c8efa077777a8a4c
  Author: Sebastian Berg <sebastian@sipsolutions.net>
  Date:   2012-12-06 (Thu, 06 Dec 2012)

  Changed paths:
    M numpy/random/mtrand/mtrand.c

  Log Message:
  -----------
  MAINT: Regenerate mtrand.c


  Commit: cdeb48be603323b2db9e6cc3eb6441f75ec622f6
      https://github.com/numpy/numpy/commit/cdeb48be603323b2db9e6cc3eb6441f75ec622f6
  Author: Ondřej Čertík <ondrej.certik@gmail.com>
  Date:   2012-12-13 (Thu, 13 Dec 2012)

  Changed paths:
    M numpy/random/mtrand/mtrand.c
    M numpy/random/mtrand/mtrand.pyx
    M numpy/random/tests/test_random.py

  Log Message:
  -----------
  Merge pull request #2793 from certik/pull-request-2727

This is PR #2727, but rebased


Compare: https://github.com/numpy/numpy/compare/35dc14b0a59c...cdeb48be6033


More information about the Numpy-svn mailing list