MCPcopy
hub / github.com/1Panel-dev/MaxKB / flat_map

Function flat_map

apps/common/utils/common.py:372–381  ·  view source on GitHub ↗

将二位数组转为一维数组 :param array: 二维数组 :return: 一维数组

(array: List[List])

Source from the content-addressed store, hash-verified

370
371
372def flat_map(array: List[List]):
373 """
374 将二位数组转为一维数组
375 :param array: 二维数组
376 :return: 一维数组
377 """
378 result = []
379 for e in array:
380 result += e
381 return result
382
383
384def parse_image(content: str):

Callers 4

chat_simpleMethod · 0.90
get_paragraph_listFunction · 0.90
_runMethod · 0.90
executeMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected