I am using numarray.
Suppose I have p = array(range(25), shape=(5,5)) p
array([[ 0, 1, 2, 3, 4],
[ 5, 6, 7, 8, 9],
[10, 11, 12, 13, 14],
[15, 16, 17, 18, 19],
[20, 21, 22, 23, 24]])
How do I easily slice out [0,1,2] or [1,2,3] or
[2,7,12] or [7,12,17] and put it in a list?
I checked the documentation at http://www.esrf.fr/computing/bliss/p...ml/node26.html
, but could not get it.
Thanks.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com 0 905 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Raoul Gough |
last post by:
As of Python 2.3, Section 2.2.6 (Sequence Types) describes slices
which have a specified step (to omit some indexes in beteween), using
the notation s. The note about how this works says:
"The...
|
by: Jerry Sievers |
last post by:
Fellow Pythonists;
I am totally puzzled on the use of slicing on mapping types and
especially unsure on use of the Ellipsis... and slicing syntax that
has two or more groups seperated by comma....
|
by: Bryan Olson |
last post by:
I recently wrote a module supporting value-shared slicing. I
don't know if this functionality already existed somewhere, but
I think it's useful enough that other Pythoners might want it,
so here...
|
by: jbperez808 |
last post by:
>>> rs='AUGCUAGACGUGGAGUAG'
>>> rs='GAG'
Traceback (most recent call last):
File "<pyshell#119>", line 1, in ?
rs='GAG'
TypeError: object doesn't support slice assignment
You can't assign to...
|
by: Jon Slaughter |
last post by:
I'm having a little trouble understanding what the slicing problem is.
In B.S.'s C++ PL3rdEd he says
"Becayse the Employee copy functions do not know anything about Managers,
only the Employee...
|
by: baibaichen |
last post by:
i have written some code to verify how to disable slicing copy
according C++ Gotchas item 30
the follow is my class hierarchy, and note that B is abstract class!!
class B
{
public:
explicit...
|
by: Bart Simpson |
last post by:
Can anyone explain the concept of "slicing" with respect to the "virtual
constructor" idiom as explain at parashift ?
From parashift:
class Shape {
public:
virtual ~Shape() { } ...
|
by: Rahul |
last post by:
Hi Everyone,
I was working around object slicing (pass by value) and was
wondering how it is specified in the standard,
class A
{
};
class B: public A
|
by: Erik Lind |
last post by:
I see a more complicated thread on a similar sounding question, but my
question is simpler, I hope.
I have a large numpy matrix, initially created as:
Mat = zeros((a,b), int)
and a smaller...
|
by: subramanian100in |
last post by:
Consider
class Base
{
....
};
class Derived : public Base
{
...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |