Re: [Numpy-discussion] printing array in tabular form

2013-05-07 Thread Henry Gomersall
On Wed, 2013-05-08 at 10:13 +0800, Sudheer Joseph wrote:
> However I get below error. Please tell me if any thing I am missing.
> 
> 
> file "read_reg_grd.py", line 22, in 
> np.savetxt("file.txt", IL.reshape(-1,5), fmt='%5d', delimiter=',')
> AttributeError: 'list' object has no attribute 'reshape'

IL is a list, not a numpy array. You can either convert the list to an
array after you've filled it, using np.array(IL), or you can
pre-allocate the array and fill it directly in the loop.

Cheers,

Henry

___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] printing array in tabular form

2013-05-07 Thread Sudheer Joseph
Thank you Derek,
                   However I get below error. Please tell me if any thing I am 
missing.

file "read_reg_grd.py", line 22, in 
    np.savetxt("file.txt", IL.reshape(-1,5), fmt='%5d', delimiter=',')
AttributeError: 'list' object has no attribute 'reshape'

with best regards,
Sudheer 
***
Sudheer Joseph 
Indian National Centre for Ocean Information Services
Ministry of Earth Sciences, Govt. of India
POST BOX NO: 21, IDA Jeedeemetla P.O.
Via Pragathi Nagar,Kukatpally, Hyderabad; Pin:5000 55
Tel:+91-40-23886047(O),Fax:+91-40-23895011(O),
Tel:+91-40-23044600(R),Tel:+91-40-9440832534(Mobile)
E-mail:sjo.in...@gmail.com;sudheer.jos...@yahoo.com
Web- http://oppamthadathil.tripod.com
***


>
> From: Derek Homeier 
>To: Discussion of Numerical Python  
>Sent: Tuesday, 7 May 2013 6:41 PM
>Subject: Re: [Numpy-discussion] printing array in tabular form
> 
>
>Dear Sudheer,
>
>On 07.05.2013, at 11:14AM, Sudheer Joseph  wrote:
>
>>             I need to print few arrays in a tabular form for example below 
>>array IL has 25 elements, is there an easy way to print this as 5x5 comma 
>>separated table? in python
>> 
>> IL=[]
>> for i in np.arange(1,bno+1):
>>        IL.append(i)
>> print(IL)
>> 
>assuming you want this table printed to a file, savetxt does just what you 
>need. In brief for your case,
>
>np.savetxt("file.txt", IL.reshape(-1,5), fmt='%5d', delimiter=',')
>
>should print it in the requested form; you can refer to the save txt 
>documentation for further options.
>
>HTH,
>                        Derek
>
>___
>NumPy-Discussion mailing list
>NumPy-Discussion@scipy.org
>http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>
>___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] CfP 2013 Workshop on Middleware for HPC and Big Data Systems (MHPC'13)

2013-05-07 Thread MHPC 2013
we apologize if you receive multiple copies of this message
===

CALL FOR PAPERS

2013 Workshop on

Middleware for HPC and Big Data Systems

MHPC '13

as part of Euro-Par 2013, Aachen, Germany

===

Date: August 27, 2012

Workshop URL: http://m-hpc.org

Springer LNCS

SUBMISSION DEADLINE:

May 31, 2013 - LNCS Full paper submission (rolling abstract submission)
June 28, 2013 - Lightning Talk abstracts


SCOPE

Extremely large, diverse, and complex data sets are generated from
scientific applications, the Internet, social media and other applications.
Data may be physically distributed and shared by an ever larger community.
Collecting, aggregating, storing and analyzing large data volumes
presents major challenges. Processing such amounts of data efficiently
has been an issue to scientific discovery and technological
advancement. In addition, making the data accessible, understandable and
interoperable includes unsolved problems. Novel middleware architectures,
algorithms, and application development frameworks are required.

In this workshop we are particularly interested in original work at the
intersection of HPC and Big Data with regard to middleware handling
and optimizations. Scope is existing and proposed middleware for HPC
and big data, including analytics libraries and frameworks.

The goal of this workshop is to bring together software architects,
middleware and framework developers, data-intensive application developers
as well as users from the scientific and engineering community to exchange
their experience in processing large datasets and to report their scientific
achievement and innovative ideas. The workshop also offers a dedicated forum
for these researchers to access the state of the art, to discuss problems
and requirements, to identify gaps in current and planned designs, and to
collaborate in strategies for scalable data-intensive computing.

The workshop will be one day in length, composed of 20 min paper
presentations, each followed by 10 min discussion sections.
Presentations may be accompanied by interactive demonstrations.


TOPICS

Topics of interest include, but are not limited to:

- Middleware including: Hadoop, Apache Drill, YARN, Spark/Shark, Hive,
Pig, Sqoop,
HBase, HDFS, S4, CIEL, Oozie, Impala, Storm and Hyrack
- Data intensive middleware architecture
 - Libraries/Frameworks including: Apache Mahout, Giraph, UIMA and GraphLab
- NG Databases including Apache Cassandra, MongoDB and CouchDB/Couchbase
- Schedulers including Cascading
- Middleware for optimized data locality/in-place data processing
- Data handling middleware for deployment in virtualized HPC environments
- Parallelization and distributed processing architectures at the
middleware level
- Integration with cloud middleware and application servers
- Runtime environments and system level support for data-intensive computing
- Skeletons and patterns
- Checkpointing
- Programming models and languages
- Big Data ETL
- Stream processing middleware
- In-memory databases for HPC
- Scalability and interoperability
- Large-scale data storage and distributed file systems
- Content-centric addressing and networking
- Execution engines, languages and environments including CIEL/Skywriting
- Performance analysis, evaluation of data-intensive middleware
- In-depth analysis and performance optimizations in existing data-handling
middleware, focusing on indexing/fast storing or retrieval between compute
and storage nodes
- Highly scalable middleware optimized for minimum communication
- Use cases and experience for popular Big Data middleware
- Middleware security, privacy and trust architectures

DATES

Papers:
Rolling abstract submission
May 31, 2013 - Full paper submission
July 8, 2013 - Acceptance notification
October 3, 2013 - Camera-ready version due

Lightning Talks:
June 28, 2013 - Deadline for lightning talk abstracts
July 15, 2013 - Lightning talk notification

August 27, 2013 - Workshop Date


TPC

CHAIR

Michael Alexander (chair), TU Wien, Austria
Anastassios Nanos (co-chair), NTUA, Greece
Jie Tao (co-chair), Karlsruhe Institut of Technology, Germany
Lizhe Wang (co-chair), Chinese Academy of Sciences, China
Gianluigi Zanetti (co-chair), CRS4, Italy

PROGRAM COMMITTEE

Amitanand Aiyer, Facebook, USA
Costas Bekas, IBM, Switzerland
Jakob Blomer, CERN, Switzerland
William Gardner, University of Guelph, Canada
José Gracia, HPC Center of the University of Stuttgart, Germany
Zhenghua Guom,  Indiana University, USA
Marcus Hardt,  Karlsruhe Institute of Technology, Germany
Sverre Jarp, CERN, Switzerland
Christopher Jung,  Karlsruhe Institute of Technology, Germany
Andreas Knüpfer - Technische Universität Dresden, Germany
Nectarios Koziris, National Technical University of Athens, Greece
Yan Ma, Chinese Academy of Sciences, China
Martin Schulz - Lawrence Livermore National Laboratory
Viral Shah, MIT

Re: [Numpy-discussion] Numpy beginner tutorial

2013-05-07 Thread eat
Hi,

Looks nice tutorial, indeed.


On Tue, May 7, 2013 at 12:54 PM, Nicolas Rougier
wrote:

>
>
> Hello everybody,
>
>
> I've written a numpy beginner tutorial that is available from:
>
> http://www.loria.fr/~rougier/teaching/numpy/numpy.html
>
> It has been designed around cellular automata to try to make it fun.
>
Perhaps you could also link to
http://www.scipy.org/Cookbook/GameOfLifeStrides (at least if you are
planning to have exercises beyond Apprentice level). IMHO it just provides
more natural view of the neighborhood via stride_tricks.

>
>
> While writing it, I tried to compile a set of exercises and make them
> progressively harder. For advanced levels, I thought the easiest way would
> be to extract simple questions (but more importantly answers) from this
> very mailing list in order to gather them on a single page. The goal would
> be both to offer a quick reference for new (and old users) and to provide
> also a set of exercices for those who teach. However, it's a bit harder
> than I thought since the mailing list is huge.
>
> I made a separate page for this:
>
> http://www.loria.fr/~rougier/teaching/numpy.100/index.html
> (Sources are http://www.loria.fr/~rougier/teaching/numpy.100/index.rst)
>
> (The level names came from an old-game: Dungeon Master)
>
>
> In order to extract questions/answers and I would need some help, if you
> have some free time to spare...
>
> If you remember having asked or answered a (short) problem, could you send
> a link to the relevant post (the one with the answer), or better, write
> directly the formated entry. Here is an example:
>
>
> #. Find indices of non-zero elements from [1,2,0,0,4,0]
>
>.. code:: python
>
>   # Author: Somebody
>
>   print np.nonzero([1,2,0,0,4,0])
>
>
> If you can provide the (assumed) level of the answer, that would be even
> better.

My 2 cents,
-eat

>


> Nicolas
>
> ___
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Numpy beginner tutorial

2013-05-07 Thread Nicolas Rougier


Shame on me ! How did I forget this one...
Thanks, just added it.

Nicolas


> 
> Hi Nicolas, that looks good. You're linking to some other tutorials at the 
> bottom, maybe you can add http://scipy-lectures.github.io/ (has both an intro 
> and an advanced numpy tutorial). 
> 
> Ralf

___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Numpy beginner tutorial

2013-05-07 Thread Ralf Gommers
On Tue, May 7, 2013 at 11:54 AM, Nicolas Rougier
wrote:

>
>
> Hello everybody,
>
>
> I've written a numpy beginner tutorial that is available from:
>
> http://www.loria.fr/~rougier/teaching/numpy/numpy.html
>
> It has been designed around cellular automata to try to make it fun.
>

Hi Nicolas, that looks good. You're linking to some other tutorials at the
bottom, maybe you can add http://scipy-lectures.github.io/ (has both an
intro and an advanced numpy tutorial).

Ralf
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] searchsorted descending arrays

2013-05-07 Thread Benjamin Root
On Mon, May 6, 2013 at 7:16 PM, Nathaniel Smith  wrote:

> On Mon, May 6, 2013 at 6:54 PM, Bago  wrote:
> > I submitted a patch a little while ago,
> > https://github.com/numpy/numpy/pull/3107, which gave the searchsorted
> > function the ability to search arrays sorted in descending order. At the
> > time my  approach was to detect the sortorder of the array by comparing
> the
> > first and last elements. This works pretty well in most cases, but fails
> in
> > one notable case. After giving it some thought, I think the best way to
> add
> > searching of descending arrays to numpy would be by adding a keyword to
> the
> > searchsorted function. I wanted to know what you guys thought of this
> before
> > updating the pr.
> >
> > I would like to add something like the following to numpy:
> >
> > A = [10, 9, 2, 1]
> > np.searchsorted(A, 5, sortorder='descending')
> >
> > the other option would be to auto-detect the order, but then this case
> might
> > surprise some users:
> >
> > A = [0, 0, 0]
> > A = np.sort(A)[::-1]
> > print np.searchsorted(A, [1, -1])
> > # [3, 0]
> >
> > This might surprise a user who expects to be searching a descending array
>
> I agree, that result would not really be acceptable (could easily
> break various algorithms in very hard to notice cases), so a kwarg
> would be better.
>
> -n
>

+1 on kwarg approach.
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] printing array in tabular form

2013-05-07 Thread Derek Homeier
Dear Sudheer,

On 07.05.2013, at 11:14AM, Sudheer Joseph  wrote:

> I need to print few arrays in a tabular form for example below 
> array IL has 25 elements, is there an easy way to print this as 5x5 comma 
> separated table? in python
> 
> IL=[]
> for i in np.arange(1,bno+1):
>IL.append(i)
> print(IL)
> 
assuming you want this table printed to a file, savetxt does just what you 
need. In brief for your case,

np.savetxt("file.txt", IL.reshape(-1,5), fmt='%5d', delimiter=',')

should print it in the requested form; you can refer to the save txt 
documentation for further options.

HTH,
Derek

___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Really cruel draft of vbench setup for NumPy (.add.reduce benchmarks since 2011)

2013-05-07 Thread Daπid
On 7 May 2013 13:47, Sebastian Berg  wrote:
> Indexing/assignment was the first thing I thought of too (also because
> fancy indexing/assignment really could use some speedups...). Other then
> that maybe some timings for small arrays/scalar math, but that might be
> nice for that GSoC project.

Why not going bigger? Ufunc operations on big arrays, CPU and memory bound.

Also, what about interfacing with other packages? It may increase the
compiling overhead, but I would like to see Cython in action (say,
only last version, maybe it can be fixed).
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Really cruel draft of vbench setup for NumPy (.add.reduce benchmarks since 2011)

2013-05-07 Thread Sebastian Berg
On Mon, 2013-05-06 at 12:11 -0400, Yaroslav Halchenko wrote:
> On Mon, 06 May 2013, Sebastian Berg wrote:
> 
> > > if you care to tune it up/extend and then I could fire it up again on
> > > that box (which doesn't do anything else ATM AFAIK).   Since majority of
> > > time is spent actually building it (did it with ccache though) it would
> > > be neat if you come up with more of benchmarks to run which you might
> > > think could be interesting/important.
> 
> > I think this is pretty cool! Probably would be a while until there are
> > many tests, but if you or someone could set such thing up it could
> > slowly grow when larger code changes are done?
> 
> that is the idea but it would be nice to gather such simple
> benchmark-tests.  if you could hint on the numpy functionality you think
> especially worth benchmarking (I know -- there is a lot of things
> which could be set to be benchmarked) -- that would be a nice starting
> point: just list functionality/functions  you consider of primary
> interest. and either it is worth testing for different types or just a
> gross estimate (e.g. for the selection of types in a loop)
> 
> As for myself -- I guess I will add fancy indexing and slicing tests.
> 

Indexing/assignment was the first thing I thought of too (also because
fancy indexing/assignment really could use some speedups...). Other then
that maybe some timings for small arrays/scalar math, but that might be
nice for that GSoC project.

Maybe array creation functions, just to see if performance bugs should
sneak into something that central. But can't think of something else
that isn't specific functionality.

- Sebastian

> Adding them is quite easy: have a look at
> https://github.com/yarikoptic/numpy-vbench/blob/master/vb_reduce.py
> which is actually a bit more cumbersome because of running them for
> different types.
> This one is more obvious:
> https://github.com/yarikoptic/numpy-vbench/blob/master/vb_io.py
> 


___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] Numpy beginner tutorial

2013-05-07 Thread Nicolas Rougier


Hello everybody,


I've written a numpy beginner tutorial that is available from:

http://www.loria.fr/~rougier/teaching/numpy/numpy.html

It has been designed around cellular automata to try to make it fun.


While writing it, I tried to compile a set of exercises and make them 
progressively harder. For advanced levels, I thought the easiest way would be 
to extract simple questions (but more importantly answers) from this very 
mailing list in order to gather them on a single page. The goal would be both 
to offer a quick reference for new (and old users) and to provide also a set of 
exercices for those who teach. However, it's a bit harder than I thought since 
the mailing list is huge.

I made a separate page for this:

http://www.loria.fr/~rougier/teaching/numpy.100/index.html
(Sources are http://www.loria.fr/~rougier/teaching/numpy.100/index.rst)

(The level names came from an old-game: Dungeon Master)


In order to extract questions/answers and I would need some help, if you have 
some free time to spare...

If you remember having asked or answered a (short) problem, could you send a 
link to the relevant post (the one with the answer), or better, write directly 
the formated entry. Here is an example:


#. Find indices of non-zero elements from [1,2,0,0,4,0]

   .. code:: python

  # Author: Somebody

  print np.nonzero([1,2,0,0,4,0])


If you can provide the (assumed) level of the answer, that would be even better.


Nicolas

___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] printing array in tabular form

2013-05-07 Thread Sudheer Joseph
Dear experts,
    I need to print few arrays in a tabular form for example below 
array IL has 25 elements, is there an easy way to print this as 5x5 comma 
separated table? in python

IL=[]
for i in np.arange(1,bno+1):
   IL.append(i)
print(IL)

%
in fortran I could do it as below
%
integer matrix(5,5)
   in=0
  do, k=1,5
  do, l=1,5
   in=in+1
  matrix(k,l)=in
  enddo
  enddo
  m=5
  n=5
  do, i=1,m
  write(*,"(5i5)") ( matrix(i,j), j=1,n )
  enddo
  end
 

***
Sudheer Joseph 
Indian National Centre for Ocean Information Services
Ministry of Earth Sciences, Govt. of India
POST BOX NO: 21, IDA Jeedeemetla P.O.
Via Pragathi Nagar,Kukatpally, Hyderabad; Pin:5000 55
Tel:+91-40-23886047(O),Fax:+91-40-23895011(O),
Tel:+91-40-23044600(R),Tel:+91-40-9440832534(Mobile)
E-mail:sjo.in...@gmail.com;sudheer.jos...@yahoo.com
Web- http://oppamthadathil.tripod.com
***___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion