Ticket #31 (closed enhancement: fixed)

Opened 2 months ago

Last modified 2 months ago

isi() function returns a list of arrays

Reported by: voges Assigned to: pierre
Priority: major Milestone: 0.1
Component: signals Version: trunk
Keywords: Cc:

Description

The function res=isi() in Neurotools.signals returns a list of arrays instead of an array of arrays. In this case -- as far as i tried -- it is not possible to use commands like numpy.mean(res) or len(res) what is uncomfortable. Can that be changed or is ther a specific reason i do not know?

Change History

10/31/08 11:23:18 changed by pierre

  • status changed from new to assigned.
  • owner set to pierre.

The problem is that isi() functions return all the individual isi vectors obtained for all the cells present in the Population. This is therefore a list of vectors with different sizes. That's why we choose to use a list of arrays instead of an array of arrays. Because each column has a different size. You can have the length of the individual elements by len(pop.isi()[idx]). But if you want to have the mean of the isi, or something else, you should rather use isi_hist() that will in fact concatenate all those isi() arrays. If that's what you want to do by the way: concatenate(pop.isi()) will return a single array with all the isi of all your cells

Cheers

11/03/08 23:17:01 changed by pierre

  • status changed from assigned to closed.
  • resolution set to fixed.

I guess I gave a response to the ticket, I don't see a clever way to return a list of non homogeneous vectors. The use of concatenate(isi() ) can solve the problem