MCPcopy Create free account
hub / github.com/brainflow-dev/brainflow / get_num_rows

Method get_num_rows

python_package/brainflow/board_shim.py:741–757  ·  view source on GitHub ↗

get number of rows in resulting data table for a board :param board_id: Board Id :type board_id: int :param preset: preset :type preset: int :return: number of rows in returned numpy array :rtype: int :raises BrainFlowError: If this board has

(cls, board_id: int, preset: int = BrainFlowPresets.DEFAULT_PRESET)

Source from the content-addressed store, hash-verified

739
740 @classmethod
741 def get_num_rows(cls, board_id: int, preset: int = BrainFlowPresets.DEFAULT_PRESET) -> int:
742 """get number of rows in resulting data table for a board
743
744 :param board_id: Board Id
745 :type board_id: int
746 :param preset: preset
747 :type preset: int
748 :return: number of rows in returned numpy array
749 :rtype: int
750 :raises BrainFlowError: If this board has no such data exit code is UNSUPPORTED_BOARD_ERROR
751 """
752
753 num_rows = numpy.zeros(1).astype(numpy.int32)
754 res = BoardControllerDLL.get_instance().get_num_rows(board_id, preset, num_rows)
755 if res != BrainFlowExitCodes.STATUS_OK.value:
756 raise BrainFlowError('unable to request info about this board', res)
757 return int(num_rows[0])
758
759 @classmethod
760 def get_timestamp_channel(cls, board_id: int, preset: int = BrainFlowPresets.DEFAULT_PRESET) -> int:

Callers

nothing calls this directly

Calls 3

BrainFlowErrorClass · 0.90
get_num_rowsMethod · 0.65
get_instanceMethod · 0.45

Tested by

no test coverage detected