Skip to content

Why does np.dot does not work with memmaped output array? #9641

@romankierzkowski

Description

@romankierzkowski

Executing:

a = np.ones((10,1))
b = np.ones((10,1))
c = np.memmap('zeros.mat', dtype=np.float64, mode='w+', shape=a.dot(b.T).shape, order='C')

a.dot(b.T, out=c)

Gives error:

ValueError: output array is not acceptable (must have the right type, nr dimensions, and be a C-Array)

But:

print(a.dtype == b.dtype == c.dtype)
print(np.dot(a, b.T).shape == c.shape)
print(c.flags['C_CONTIGUOUS'])

Returns:
True
True
True

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions