Dear Scientist using Python,
EuroSciPy 2013, the Sixth Annual Conference on Python in Science, takes place in
Brussels on 21 - 24 August 2013. The conference features two days of tutorials
followed by two days of scientific talks that start with our keynote speakers,
Cameron Neylon and Peter Wang.
The topics presented at EuroSciPy are very diverse, with a focus on advanced
software engineering and original uses of Python and its scientific libraries,
either in theoretical or experimental research, from both academia and the
industry. The program includes contributed talks and posters.
Submissions for talks and posters are welcome on our website
(http://www.euroscipy.org/). Authors must use the web interface to submit an
abstract to the conference. In your abstract, please provide details on what
Python tools are being employed, and how.
The deadline for submission is 28 April 2013.
Until 31 March 2013, you can apply for a sprint session on 25 August 2013.
Also, potential organizers for EuroSciPy 2014 are welcome to contact the
conference committee.
SciPythonic Regards,
The EuroSciPy 2013 Committee
http://www.euroscipy.org/
Conference Chairs: Pierre de Buyl and Nicolas Pettiaux, Université libre de
Bruxelles, Belgium
Tutorial Chair: Nicolas Rougier, INRIA, Nancy, France
Program Chair: Tiziano Zito, Humboldt-Universität zu Berlin, Germany
Program Committee
Ralf Gommers, ASML, The Netherlands
Emmanuelle Gouillart, Joint Unit CNRS/Saint-Gobain, France
Kael Hanson, Université Libre de Bruxelles, Belgium
Konrad Hinsen, Centre National de la Recherche Scientifique (CNRS), France
Hans Petter Langtangen, Simula and University of Oslo, Norway
Mike Müller, Python Academy, Germany
Raphael Ritz, International Neuroinformatics Coordinating Facility, Stockholm,
Sweden
Stéfan van der Walt, Applied Mathematics, Stellenbosch University, South Africa
Gaël Varoquaux, INRIA Parietal, Saclay, France
Nelle Varoquaux, Mines ParisTech, France
Pauli Virtanen, Aalto University, Finland
Organizing Committee
Nicolas Chauvat, Logilab, France
Emmanuelle Gouillart, Joint Unit CNRS/Saint-Gobain, France
Kael Hanson, Université Libre de Bruxelles, Belgium
Renaud Lambiotte, University of Namur, Belgium
Thomas Lecocq, Royal Observatory of Belgium
Mike Müller, Python Academy, Germany
Didrik Pinte, Enthought Europe
Gaël Varoquaux, INRIA Parietal, Saclay, France
Nelle Varoquaux, Mines ParisTech, France
Hi,
I'm trying to increment an array using indexing and a second array for increment values (since it might be a little tedious to explain, see below for a short example).
Using "direct" indexing, the values in the example are incremented by 1 only while I want to achieve the alternative behavior. My question is whether there is such function in numpy or if there a re better way to achieve the same result ?
(I would like to avoid the while statement)
I found and adapted the alternative solution from: http://stackoverflow.com/questions/2004364/increment-numpy-array-with-repea… but it is only for a fixed increment from what I've understood.
Nicolas
# ------------------------
import numpy as np
n,p = 5,100
nodes = np.zeros( n, [('value', 'f4', 1)] )
links = np.zeros( p, [('source', 'i4', 1),
('target', 'i4', 1)])
links['source'] = np.random.randint(0, n, p)
links['target'] = np.random.randint(0, n, p)
targets = links['target'] # Indices can be repeated
K = np.ones(len(targets)) # Note K could be anything
# Direct indexing
nodes['value'] = 0
nodes['value'][targets] += K
print nodes
# "Alternative" indexing
nodes['value'] = 0
B = np.bincount(targets)
while B.any():
I = np.argwhere(B>=1)
nodes['value'][I] += K[I]
B = np.maximum(B-1,0)
print nodes