Skip to content

Conversation

mratsim
Copy link
Owner

@mratsim mratsim commented Sep 25, 2017

  1. Deprecate newTensor(shape: openarray[int], T: typedesc)
    for
    newTensor[T](shape: varargs[int])

This allows the new let a = newTensor[int](5,3) as well as newTensor[int]([5,3])
Furthermore proc[T]() is nim idiom, old syntax was used as a workaround for something I don't remember.

Issue: deprecated warning rampage, reported upstream: nim-lang/Nim#6436

  1. Shorter name newSeqUninitialized --> newSeqUninit

  2. replace newTensor from Use non initialized seqs where appropriate #64 by newTensorUninit (for uninitialized) and bring back the old behavior (init with default value).
    Also replace tensorCpu + newSeqUninit by a single newTensorUninit

  3. newTensor with value is changed to newTensorWith (mirror sequtils)

cc @edubart : Beware before pulling master. I'm pushing that in 3-4 hours

@mratsim mratsim merged commit ea7508c into master Sep 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant