iblis17 edited a comment on issue #13934: Julia: deprecate `mx.empty`, replace 
it with `UndefInitializer` constructor
URL: https://github.com/apache/incubator-mxnet/pull/13934#issuecomment-455927683
 
 
   Yeah, for instance:
   ```julia
   julia> mx.empty(2, 3)
   ┌ Warning: `mx.empty(dims...)` is deprecated, use `NDArray(undef, dims...)` 
instead.
   └ @ MXNet.mx ~/.julia/dev/MXNet/src/deprecated.jl:193
   2×3 NDArray{Float32,2} @ CPU0:
    -2.690016f-37  -2.7809797f-37  4.5f-44
     3.0819f-41     3.0819f-41     0.0f0  
   
   julia> mx.empty((2, 3))
   ┌ Warning: `mx.empty(dims, ctx)` is deprecated, use `NDArray(undef, dims; 
ctx = ctx)` instead.
   └ @ MXNet.mx ~/.julia/dev/MXNet/src/deprecated.jl:187
   2×3 NDArray{Float32,2} @ CPU0:
    -3.1642064f-37  1.7975115f19     8.0f-44
     3.0819f-41     0.00017281323f0  0.0f0
   ```
   
   By Julia's convention, any API changes will pop a deprecation warning (we 
call it *depwarn* in Julia community) to help user update their code.
   Usually, the depwarn will be removed and turned into error in the next 
package release cycle.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to