parallelgithub commented on issue #9771: Modify NDArrayIter constructor to 
receive tuple (i.e. dict in Python)?
   Adding an additional constructor is our first consideration. But after 
observing the original interface: 
   class NDArrayIter (data: IndexedSeq[NDArray], label: IndexedSeq[NDArray] = 
                     private val dataBatchSize: Int = 1, shuffle: Boolean = 
                     lastBatchHandle: String = "pad",
                     dataName: String = "data", labelName: String = "label") 
extends DataIter {...
   we found there is no position to place the custom names. Therefore, since 
each overloading constructor has to call primary constructor, keeping the 
original interface may not a possible way if we want to make using multiple 
input flexible.
   Another reason we modifying the existing constructor is that we observer the 
fields defined in the class:
   val initData: IndexedSeq[(String, NDArray)] = IO.initData(_dataList, false, 
   val initLabel: IndexedSeq[(String, NDArray)] = IO.initData(_labelList, true, 
   We guess maybe using the type `IndexedSeq[(String, NDArray)] ` is the 
original motivation at the beginning.
   In Python there is a 
 to manipulate multiple input. But Scala is static type. Maybe we can try to 
rethink about the API interface design.

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:

With regards,
Apache Git Services

Reply via email to