Skip to content

Code example in vmap notebook is incorrect. #16

@ericmjl

Description

@ericmjl

tl;dr version to copy/paste into a corrected version of a notebook:

def vmapped_func(array):
    result = []
    for element in array:
        result.append(func(element))
    result = np.stack(result)
    return result

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions