numpy

plotting a parabola within part of a repeating signal using numpy

I have a repeating signal that varies a little bit with each cycle of a process that repeats roughly every second, though the duration and the contents of each cycle vary from each other a little bit within some parameters. There are a thousand x,y coordinates for every second of my signal data. A small, but important, segment of the d...

Python "Value Error: cannot delete array elements" -- Why am I getting this?

Hi Everyone, I would really appreciate some help on this issue, I haven't been able to find anything about this value error online and I am at a complete loss as to why my code is illiciting this response. I have a large dictionary of something like 50 keys. The value associated with each key is a 2D array of many elements of the form...

Phylo BioPython building trees

Hello! I trying to build a tree with BioPython, Phylo module. What I've done so far is this image: each name has a four digit number followed by - and a number: this number refer to the number of times that sequence is represented. That means 1578 - 22, that node should represent 22sequences. the file with the sequences aligned: file...

Python Numpy ndarray

I have 3 code snippets: (1) x = array([[]]) #x.ndim=2 x=append(x,[[1,2]]) #after this, x.ndim=1??????????????????? x=append(x,[[3,4]],axis=0) #error b/c dimension (2) x = array([[]]) #x.ndim=2 x=append(x,[[1,2]],axis=0) #error b/c dimension????????????????? (3) x=append([[1,2]],[[3,4]],axis=0) #Good The (???????????) i...

Order of numpy orperations is not equal to logic (and also octave)?

Hi Everyone, Maybe this question should be strictly in the scipy-users, but I'll try here too. So here is something which I discovered lately and is making me wonder. I want to define a scalar which I call Net Absolute Mass Balance Error or in short NAMBE. This NAMBE is the absolute difference between a base vector and another vecto...

Python/Numpy: Convert list of bools to unsigned int

What is the fastest (or most "Pythonic") way to convert x = [False, False, True, True] into 12? (If there is such a way.) What if x were instead a numpy.array of bools? Is there a special command for that? I have a large m-by-n array of booleans, where each n-element row represents a single low-dimensional hash of a high-dimensiona...