Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • 3
    What are you trying to accomplish? Commented Jun 7, 2015 at 10:53
  • Well I believe it's correct, TLabels[dist_ == dist_[i]] will return values from TLabels which have indices where dist_ == dist_[i]. For example let dist_ = array([2,1,2]) and TLabels=array([1,2,3]) so dist_ == dist_[0] will return array([True,False,True]) than TLabels[dist_ == dist_[0]] = array([1,3]) Commented Jun 7, 2015 at 11:01
  • Just to be clear, are the arrays (t,1) or (t,)? Where is cLoss initialized? Commented Jun 7, 2015 at 18:00
  • 1
    You need to turn this into a full running (cut and paste) example, with output. Otherwise we won't take it seriously. Commented Jun 7, 2015 at 18:09
  • Is cLoss initially 0 or []. And why the return? You aren't defining a function. Commented Jun 7, 2015 at 19:41