MCPcopy Create free account
hub / github.com/Yaafe/Yaafe / writeInput

Method writeInput

src_python/yaafelib/engine.py:216–234  ·  view source on GitHub ↗

Write data on an input. :param name: input on which to write :type name: string :param data: data to write. :type data: numpy array

(self, name, data)

Source from the content-addressed store, hash-verified

214 return res
215
216 def writeInput(self, name, data):
217 """
218 Write data on an input.
219
220 :param name: input on which to write
221 :type name: string
222 :param data: data to write.
223 :type data: numpy array
224
225 """
226 size = 1
227 toks = len(data)
228 if (len(data.shape) == 2):
229 size = data.shape[0]
230 toks = data.shape[1]
231 elif (len(data.shape) > 2):
232 print('ERROR: data must be a 1-d or 2-d array !')
233 return
234 yc.engine_input_write(self.ptr, to_char(name), data, size, toks)
235
236 def readOutput(self, name):
237 """

Callers 1

processAudioMethod · 0.95

Calls 1

to_charFunction · 0.90

Tested by

no test coverage detected