I would like to have my data in a format so that I can create a contour plot.
My data is in a file with a format, where there may be multiple fields
field = 1
1a 0
2a 0
3a 5
4a 5
5a 5
6a 5
7a 5
8a 5
9a 0
10a 0
1b 0
2b 0
3b 5
4b
Hi Tom,
I'm trying to write a program to test someones typing speed and show
them their mistakes. However I'm getting weird results when looking
for the differences in longer (than 100 chars) strings:
import difflib
# a tape measure string (just makes it easier to locate a given index)
Whatever the rationale for the price you could buy 2nd Ed 'Core', Chun
*and *3rd edition(when it arrives) 'Learning Python', Lutz (the two
standard, known and respected beginners texts) for the price of this.
Mmm, I wonder what I would buy or rather have as a student.
Eddie
PS (My apologies
Bryan Fodness wrote:
I also have some information at the beginning of the file and between
each field. Is there a way to get the info at the beginning and tell
it once it sees Leaf 1A to read the values for the next 120 and then
repeat until there are no more Fields.
This should be a pretty
Bryan Fodness wrote:
I would like to have my data in a format so that I can create a contour plot.
My data is in a file with a format, where there may be multiple fields
field = 1
1a0
If your data is really this regular, it is pretty easy to parse. A
useful technique is to access a
Greetings,
Many books have the source code available for download somewhere,
or even a sample chapter? Are the examples in the book complete
programs, or are they snippets illustrating a concept? If the programs
are complete, what type of programs are they (business, science, other)?
Does the
This question has probably been asked and answered many times, but I can't
figure out how to word my question to get relevant results from Google. So
I thought I'd try some human beings, eh?
I'm working with delimited files (ANSI X12 EDI nonsense, to be precise.)
First I load the records to a
Marc Tompkins wrote:
This question has probably been asked and answered many times, but I
can't figure out how to word my question to get relevant results from
Google. So I thought I'd try some human beings, eh?
I'm working with delimited files (ANSI X12 EDI nonsense, to be
precise.)
I also have some information at the beginning of the file and between
each field. Is there a way to get the info at the beginning and tell
it once it sees Leaf 1A to read the values for the next 120 and then
repeat until there are no more Fields.
File Rev = G
Treatment = Dynamic Dose
Last Name =
Hi, I asked this question last year but got no response.
I'm trying to write a program to test someones typing speed and show
them their mistakes. However I'm getting weird results when looking
for the differences in longer (than 100 chars) strings:
import difflib
# a tape measure string (just
Marc Tompkins wrote:
I'm working with delimited files (ANSI X12 EDI nonsense, to be
precise.) First I load the records to a list:
tmpSegs = inString.split(self.SegTerm)
Now, I want to replace each string in that list with a string:
for seg in tmpSegs: # 'seg' is
Try this (untested code):
for index in xrange(0, len(tmpSegs)):
tmpSegs[index] = tmpSegs[index].split(self.ElemSep)
Thank you - that works nicely, and it's a much better replacement for
something else I was doing to achieve the same result (you know, the old
count+=1 nonsense - every day, in
What puzzles me most is that I can replace 'seg' with just about
anything else -
for seg in tmpSegs:
seg = seg.strip()
or
for seg in tmpSegs:
seg = 'bananas'
or
for seg in tmpSegs:
seg = seg + ' bananas'
and it
Kent Johnson wrote:
Marc Tompkins wrote:
I'm working with delimited files (ANSI X12 EDI nonsense, to be
precise.) First I load the records to a list:
tmpSegs = inString.split(self.SegTerm)
Now, I want to replace each string in that list with a string:
for seg in
John Fouhy wrote:
On 08/11/2007, Marc Tompkins [EMAIL PROTECTED] wrote:
Now, I did already (intellectually) understand this:
A list is an array of pointers to objects, what you've done here is
create a new name referencing an item in the list, then making that new
name point to
On 08/11/2007, Marc Tompkins [EMAIL PROTECTED] wrote:
Now, I did already (intellectually) understand this:
A list is an array of pointers to objects, what you've done here is
create a new name referencing an item in the list, then making that new
name point to something different.
Given
I'm sorting a 1-d (NumPy) matrix array (a) and wanting the index results (b).
This is what I have:
b = a.argsort(0)
b = b+1
The one (1) is added to b so that there isn't a zero index element. Is there a
more elegant way to do this?
Dinesh
___
eddie,
Whatever the rationale for the price you could buy 2nd Ed 'Core', Chun
*and *3rd edition(when it arrives) 'Learning Python', Lutz (the two
standard, known and respected beginners texts) for the price of this.
Mmm, I wonder what I would buy or rather have as a student.
i've been
I'm not sure if this is what youre asking but if you want to collect
all of the output into a file without overwriting, open the output
file with a instead of w and the output will. be appended. Iwould
suggest in that case that you include info about the user input so you
can distinguish
On Wednesday November 7, 2007, Dinesh B Vadhia wrote:
Hello! The standard Python practice for importing modules is, for example:
import sys
import os
etc.
In NumPy (and SciPy) the 'book' suggests using:
from numpy import *
from scipy import *
Hello! The standard Python practice for importing modules is, for example:
import sys
import os
etc.
In NumPy (and SciPy) the 'book' suggests using:
from numpy import *
from scipy import *
However, when I instead use 'import numpy' it causes all sorts of errors in my
existing code.
What do
Michael H. Goldwasser wrote:
from numpy import *
import numpy
There is a third option which provides the safety/control of import
numpy with a little less typing:
import numpy as np
values = np.array([1.0, 2.0, 3.0])
and you can also import just the names you need:
from numpy
On 11/4/07, Aditya Lal [EMAIL PROTECTED] wrote:
On 11/4/07, Thorsten Kampe [EMAIL PROTECTED] wrote:
* linda.s (Sun, 4 Nov 2007 01:39:46 -0800)
On Nov 2, 2007 1:03 AM, ALAN GAULD [EMAIL PROTECTED] wrote:
I want to run an .exe file and get the output many times.
Given that I know
23 matches
Mail list logo