Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Eric Wieser
    @eric-wieser
    @pearu: Not yet, but it was proposed on the mailing list, and the main sticking point was difficulty of implementation
    Peng Yu
    @yupbank
    hey channel, i’m trying to add a cumulative median/ stream median to numpy array, but the whole libary is very well abstracted, can anyone point me a direction ? numpy/numpy#14258
    Jody Klymak
    @jklymak
    @yupbank I'd look for array_cumsum in methods.c, and track the logic through there. Looks like there is a generic accumulation function. Maybe it can take "median" as an operation?
    Peng Yu
    @yupbank
    Array_cumsum is a ufunc of add. i have checked accumulation function which doesn’t quite fit, the implementation of cumulative median is more like a sorting algorithm, since i need to maintain a data structure of all the previous data in memory
    add or general accumulation doesn’t support that easily
    Vishesh Mangla
    @XtremeGood
    hi someone here?
    what's the error in this ?
    ---------------------------------------------------------------------------
    NameError                                 Traceback (most recent call last)
    <ipython-input-233-6296b41d2324> in <module>
    ----> 1 class Matrices:
          2 
          3 
          4     def __init__(self, N=10):
          5 
    
    <ipython-input-233-6296b41d2324> in Matrices()
         27 
         28 
    ---> 29     self.A = sp.csc_matrix(diags([       [self.h/6]*(self.N),   \
         30                                 [self.h/3, *[2*self.h/3]*(self.N-1), self.h/3], \
         31                                      [self.h/6]*(self.N)],               [1, 0, -1] ), dtype=np.float32)
    
    NameError: name 'self' is not defined
    Matti Picus
    @mattip
    seems a missing indent, line 29 should be indented to be inside the __init__ function
    Vishesh Mangla
    @XtremeGood
    can someone explain the functioning of scipy's RK45 function?
    Andrew Schaub
    @drewschaub
    what do you want to know about RK45?
    Vishesh Mangla
    @XtremeGood
    time step
    I want to compute value at t=1
    starting from t=0
    but step is too slow
    Andrew Schaub
    @drewschaub
    have you played around with max_step, atol or rtol?
    Vishesh Mangla
    @XtremeGood
    maxstep yes
    but what is atol
    rtol?
    also I have two extra time independent initial conditions
    Vishesh Mangla
    @XtremeGood
    I basically have initial value as numpy column array
    and each time I want the 0, -1 entry to be according to init conditins ie., 0, 0
    Andrew Schaub
    @drewschaub
    how slow is it compared to another method like rk23?
    Vishesh Mangla
    @XtremeGood
    havnt tested but for 6 time steps it takes around a minute
    and that time step should be h**2 always where h=1/N and N is lenth of y
    y = initial value
    Vishesh Mangla
    @XtremeGood
    hi someone here
    ?
    how to dump numpy to pickle?
    I have an object class of sparse matrices and lambdas etc . How do I pickle that thing
    ?
    swamyym
    @swamyym
    import pickle ; pickle.dump(obj, file)
    Vishesh Mangla
    @XtremeGood
    can someone help me in in rk45?
    pickle is not important at the moment
    Vishesh Mangla
    @XtremeGood
    hi someone here?
    I have written a program to solve the heat eqn using RK45 of scipy using the finite element method
    but increasing the number of basis functions the error increases
    its counterintuitive
    plz help
    I m using hat functions homogenous equation
    Loïc Estève
    @lesteve
    @XtremeGood asking precise and focused questions containing code snippets is very likely to improve the quality of the feed-back you get. I would suggest that you read the following resources: https://opensource.guide/how-to-contribute/#communicating-effectively, https://stackoverflow.com/help/how-to-ask and https://stackoverflow.com/help/minimal-reproducible-example.
    Vishesh Mangla
    @XtremeGood
    ok
    see the rk45 class there
    Andreas Mueller
    @amueller
    silly question but is there a reason that 1.17 is not on conda main?
    Vishesh Mangla
    @XtremeGood
    why is this code taking too much time?
    I 'm using sparse matrices.
    csr to be more specific
    Vishesh Mangla
    @XtremeGood
    how to cache np.exp
    ?