Skip to content

np.negative is not working ? #407

@Ivan-StreamingCat

Description

@Ivan-StreamingCat

Hi,

I have a NDArray of Floats with dimensions {(1, 13, 13, 3, 2)} and size 1014.

np.negative(myArray)

works by converting all values to negative. However I think that official Numpy behaviour is to convert positives to negatives and negatives to positives.

Like so:

np.negative([1.,-1.])
array([-1.,  1.])

What I get is:

np.negative([1.,-1.])
array([-1.,  -1.])

Did someone experience similar problem ?

BTW, the solution I use to solve the problem is trivial -
var negativeArray = myarray*(-1);

Metadata

Metadata

Assignees

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