简体   繁体   中英

What is return type of read_frames() scikits audiolab?

In Scikits audiolab, I'm trying to split audio's two channels in two different file, and what I observed from read_frames method is some numbers that looks like list but not exactly. And the documentation does not explicitly mention its data type. So basically it looks like,

[[-0.25283813 -0.05990601]
 [-0.28274536 -0.06542969]
 [-0.30093384 -0.06890869]
 ..., 
 [ 0.21939087  0.36206055]
 [ 0.22756958  0.36981201]
 [ 0.22592163  0.37960815]]

What is return type of read_frames()?

First, even without the documentation you can always print type(returned_value) and discover that in this case it is a numpy.ndarray instance. By the look of it, a two-dimensional one with lots of rows and two columns.

And the documentation does mention the type explicitly:

Read the given number of frames and put the data into a numpy array of the requested dtype.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM