We are happy to announce the release of Matplotlib 2.1. This is the second
minor release in the Matplotlib 2.x series and the first release with major
new features since 1.5.
This release contains approximately 2 years worth of work by 275
contributors
across over 950 pull requests. Highlights fr
On Sat, Oct 7, 2017 at 11:29 AM, Charles R Harris wrote:
> Hi All,
>
> The current NumPy implementation of the truncated zipf distribution has
> several drawbacks.
>
>
>- Extremely poor performance when the parameter `a` is near 1. For
>instance, when `a = 1.01` a simple change in the
Hi All,
The current NumPy implementation of the truncated zipf distribution has
several drawbacks.
- Extremely poor performance when the parameter `a` is near 1. For
instance, when `a = 1.01` a simple change in the implementation speeds
things up by a factor of 1,657. When the param
Hi Andrea!
Checkout the following SO answers for similar contexts:
-
https://stackoverflow.com/questions/22108488/are-list-comprehensions-and-functional-functions-faster-than-for-loops
-
https://stackoverflow.com/questions/30245397/why-is-list-comprehension-so-faster
To better visualize the issue
Apologies, correct timeit code this time (I had gotten the wrong shape for
the output matrix in the loop case):
if __name__ == '__main__':
repeat = 1000
items = [Item('item_%d'%(i+1)) for i in xrange(500)]
output = numpy.asarray([item.do_something() for item in items]).T
statemen
Hi All,
I have this little snippet of code:
import timeit
import numpy
class Item(object):
def __init__(self, name):
self.name = name
self.values = numpy.random.rand(8, 1)
def do_something(self):
sv = self.values.sum(axis=0)
array = numpy.empty((8,