You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have this function to produce nPoints of data on a curve:
constgenerateData=(nPoints: number)=>_.range(0,nPoints).map(i=>{// Inverse tanh on (-0.9, +0.9); just something to get a distribution.constx=(1.9*i)/nPoints-0.95;constatanh=Math.log1p(x)-Math.log1p(-x);return{row: i, atanh};});
The prefer-lodash-chain rule flags this because of the _.range followed by the map. It's not clear what I'm supposed to replace this with, though. It would have to be something like _(_.range(0, nPoints)).map(...).value(), which doesn't seem like an improvement.
The text was updated successfully, but these errors were encountered:
I have this function to produce
nPoints
of data on a curve:The
prefer-lodash-chain
rule flags this because of the_.range
followed by the map. It's not clear what I'm supposed to replace this with, though. It would have to be something like_(_.range(0, nPoints)).map(...).value()
, which doesn't seem like an improvement.The text was updated successfully, but these errors were encountered: