def recognize_ndarray(self, ndarray):
if self._recognize_raw_image_func is None:<EOL><INDENT>raise RuntimeError('<STR_LIT>')<EOL><DEDENT>height, width = ndarray.shape[:<NUM_LIT:2>]<EOL>bpp = ndarray.shape[<NUM_LIT:2>] if len(ndarray.shape) > <NUM_LIT:2> else <NUM_LIT:1><EOL>ptr = self._recognize_raw_image_func(self.alpr_pointer, ndarray.flatten(), bpp, width, height)<EOL>json_data = ctypes.cast(ptr, ctypes.c_char_p).value<EOL>json_data = _convert_from_charp(json_data)<EOL>p = re.compile('<STR_LIT>')<EOL>json_data = p.subn("<STR_LIT:.>", json_data)[<NUM_LIT:0>]<EOL>response_obj = json.loads(json_data)<EOL>self._free_json_mem_func(ctypes.c_void_p(ptr))<EOL>return response_obj<EOL>
This causes OpenALPR to attempt to recognize an image passed in as a numpy array.

:param ndarray: numpy.array as used in cv2 module
:return: An OpenALPR analysis in the form of a response dictionary