473,399 Members | 4,254 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Changing values of 1st column of a matrix using take(mymatrix, (0, ),axis=1)

I am talking about the 'take' method of numarray.

See here for more info:

http://stsdas.stsci.edu/numarray/Doc/node33.html

If I initialize a matrix 'mymatrix' by zeros((3,3),
type="Float64"), I get a 3*3 matrix of all zeros.

Look:
from numarray import *
mymatrix = zeros((3,3), type="Float64")
mymatrix array([[ 0., 0., 0.],
[ 0., 0., 0.],
[ 0., 0., 0.]])


I want to change the zeros of only the first column to
1's. In other words, I want to get:

array([[ 1., 0., 0.],
[ 1., 0., 0.],
[ 1., 0., 0.]])

The 'take' method is able to take out the first
column, but I am not sure if there is a good way of
changing all values of the first column to 1's.

Of course, I know that I can achieve my goal pretty
easily with this:

for i in range(3): mymatrix[i,0] = 1.0

I am just wondering if there is an existing numarray
method that elegantly does it for me.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Feb 21 '06 #1
0 1079

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Adil Hasan | last post by:
Hello, I'm having problems trying to use ZSI to connect to a https url. I give the command and I get prompted for my X509 cert pass-phrase, but the program dies with an openssl error. Here's my...
0
by: jkohans | last post by:
Hello, I am having some trouble getting a Python client written using SOAPpy 0.11.6 to work with a Web Service that is published using AXIS C++ version 1.4. I have a C++ client working, and I...
3
by: Jacky Zhu | last post by:
Hi all, I am having a problem trying to consume a webservice that is developed on ..Net. I can access it without any problem using a .net client, but when I use a java client (based on Axis...
7
by: Danny Tuppeny | last post by:
Hi All, I've been going through Google Groups, but nothing seems to quite match my problem. It's hard to post a WSDL or anything at the moment (it's not my service, I'm just using it), but maybe...
3
by: Moshe Kravchik | last post by:
Hi! We have a Web Service written in ATL Server and a client written in Java using Axis. When something goes wrong on the server side, it returns an HRESULT of the error which is translated into...
0
by: cjharrelson | last post by:
I am trying to consume a .NET web service using UsernameToken plain text password authentication. Here is my .wsdd configuration file: <!-- Using the WSDoAllSender security handler in request...
1
by: ashishr | last post by:
The web service call I am making from my WS client produces error because of actor in the axis header element. I create the header in my code but, removing the actor using removeActor() produces a...
8
by: j2flk1234 | last post by:
Hi, I have a chart that I created in excel through VB. I want to try and change the font name from Times New Roman to Symbol. I tried recording the macro in excel but when I use the code in VB...
1
by: Purohit.Amit | last post by:
Hi, I have a AXIS Webservice that is expecting a hashtable as an input. I add the web reference to the webservice and the WSDL that is generated contains the below schema for the HashTable. When I...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
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...
0
marktang
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,...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
isladogs
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.