Ticket #798 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

`piecewise` exposes raw memory

Reported by: stefan Owned by: somebody
Priority: normal Milestone: 1.2.0
Component: Other Version: none
Keywords: Cc:

Description

piecewise uses empty to allocate output memory. If the conditions do not sufficiently cover the output, then raw memory is returned, e.g.,

import numpy as np
np.piecewise([0,1,2],[True,False,False],[1])

A patch which addresses the issue is available here for review:

http://codereview.appspot.com/1105

Documentation is being updated on the wiki.

Change History

Changed 2 years ago by stefan

  • status changed from new to closed
  • resolution set to fixed

Applied in r5360.

Note: See TracTickets for help on using tickets.