MCPcopy Index your code
hub / github.com/clips/pattern / map

Method map

pattern/db/__init__.py:1848–1853  ·  view source on GitHub ↗

Applies the given function to each item in the matrix.

(self, function=lambda item: item)

Source from the content-addressed store, hash-verified

1846 return Datasheet(rows=u)
1847
1848 def map(self, function=lambda item: item):
1849 """ Applies the given function to each item in the matrix.
1850 """
1851 for i, row in enumerate(self):
1852 for j, item in enumerate(row):
1853 row[j] = function(item)
1854
1855 def slice(self, i, j, n, m):
1856 """ Returns a new Datasheet starting at row i and column j and spanning n rows and m columns.

Callers 9

test_mapMethod · 0.95
canvas.jsFile · 0.45
filterFunction · 0.45
colorizeFunction · 0.45
adjust_hueFunction · 0.45
adjust_saturationFunction · 0.45
adjust_brightnessFunction · 0.45
adjust_contrastFunction · 0.45
test_canvas.jsFile · 0.45

Calls

no outgoing calls

Tested by 1

test_mapMethod · 0.76