Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 12 01:39

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function

    (compare)

  • Sep 11 12:19

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function

    Implemented leading term and ns… (compare)

  • Sep 10 03:21

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function

    made changes (compare)

  • Sep 08 06:28

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function

    added tests for leading terms f… (compare)

  • Sep 08 03:43

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function

    Changed the outputs being retur… (compare)

  • Sep 07 09:34

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function

    Changed leading term being ret… (compare)

  • Sep 07 07:27

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function

    Removed Redundant block from le… (compare)

  • Sep 07 02:44

    anutosh491 on GSoC_Pr4.3_Implementing_some_series_method_for_uppergamma_lowergamma_expint_and_other_errors_functions

    Implemented some series methods… (compare)

  • Sep 06 16:44

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function

    Removed Order term (compare)

  • Sep 06 11:39

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function

    added test cases for limits and… (compare)

  • Sep 06 10:51

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function

    Implemented leading term and ns… (compare)

  • Sep 06 10:40

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    (compare)

  • Sep 06 04:13

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    This commit does the following … Refactored mrv_leadterm in grun… Fixed errors arising for limits… and 3 more (compare)

  • Sep 06 02:08

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    fix(integrals): handle degenera… functions: Generalised Dirichle… author: update Megan Ly in .mai… and 23 more (compare)

  • Sep 05 14:16

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    Changed if condition for bessel… (compare)

  • Sep 05 02:49

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    Improved code quality (compare)

  • Sep 03 10:24

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    changed is function to equality… (compare)

  • Sep 03 10:14

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    fixed failing tests (compare)

  • Sep 01 12:23

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    Fixed code quality (compare)

  • Sep 01 12:00

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    Added case where number of term… (compare)

Daniel Shapero
@danshapero
ok, do you want me to raise an issue?
Aaron Meurer
@asmeurer
yes please do
you can get the same kind of error with this
>>> x = MatrixSymbol('x', n, n)
>>> y = MatrixSymbol('y', n, n)
>>> z = MatrixSymbol('z', n, n)
>>> f = lambdify((x, y, z), x*y*z)
>>> a = np.ones(1)
>>> f(a, a, a)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<lambdifygenerated-4>", line 2, in _lambdifygenerated
    return ((x).dot(y).dot(z))
AttributeError: 'numpy.float64' object has no attribute 'dot'
It looks like a solution would be to use np.dot instead of array.dot
>>> np.dot(np.dot(a, a), a)
array([1.])
I wonder if anyone has ever raised this issue upstream with numpy
Daniel Shapero
@danshapero
I wonder if they might just say that it's not their problem and that sympy should change how it does codegen
Aaron Meurer
@asmeurer
we should regardless so that it works
I think we should also use * for the scalar part instead of dot.
ThePauliPrinciple
@ThePauliPrinciple
(a).dot(a).dot(a) gives the same error
Aaron Meurer
@asmeurer
if anything it will make the generated code less confusing to read
I am going to open an issue upstream to numpy
@danshapero are you going to open an issue in SymPy or do you want me to?
Daniel Shapero
@danshapero
doing that now
ThePauliPrinciple
@ThePauliPrinciple
a=np.ones((1,1))
f(a,a,a)
array([[1.]]) works
probably likewise will the other example with np.eyes((3,1))
Aaron Meurer
@asmeurer
Also, in general, np.dot does things that aren't very convenient if you pass it rank 0 or 1 arrays
I would recommend exclusively using rank 2 arrays when working with MatrixSymbol and lambdify
ThePauliPrinciple
@ThePauliPrinciple
the problem is that you have an expression with a matrix, but give a vector
Daniel Shapero
@danshapero
@ThePauliPrinciple the code I wrote does work when I pass it np.ones((3, 1))
ThePauliPrinciple
@ThePauliPrinciple
which is how you should use it
you defined x as a 3,1 matrix
Aaron Meurer
@asmeurer
basically if you pass np.dot a rank 1 array, it will "automatically" decide whether it should be a column or a row vector
ThePauliPrinciple
@ThePauliPrinciple
I don't think this is an issue in either sympy or numpy
it generated the correct code for the expression you gave to it
the problem is that there is no convenient way to define array expressions that are not matrix multiplications or are not possible to write in a single einstein notation
Daniel Shapero
@danshapero
ok, so the real answer is that I should be expressing everything using einstein notation? I can work with that
Aaron Meurer
@asmeurer
I'm not sure what you mean by einstein notation
basically MatrixSymbol represents a rank-2 numpy array. NumPy's broadcasting rules + the way lambdify generates code might not always be correct if you instead use a rank 0 or rank 1 array
Daniel Shapero
@danshapero
something like
x = sympy.symbols('x', cls=sympy.IndexedBase)
i = sympy.Idx('i')
H = 0.5 * x[i] * x[i]
Aaron Meurer
@asmeurer
so for a lambdified function where one of the variables is a MatrixSymbol, I would always pass in a rank-2 array for it
there is code to represent contractions in sympy.codegen.array_utils
but I would only recommend using it if you are indeed working with higher rank tensors
if you are only dealing with matrices, you don't need to use Indexed
Daniel Shapero
@danshapero
hrm ok, don't really have any higher-rank tensors
I haven't contributed to sympy before -- supposing I want to take a crack at this myself, can you point out where in the source code I'd want to start looking?
Daniel Shapero
@danshapero
ah just found sympy/printing/pycode.py from that issue
Sudhanshu-Taneja
@Sudhanshu-Taneja
I'm interested in working for SymPy. I have read GLPK but I didn't found any of it's codes like. So pls help to know about how and where to start??
vishakha2108
@vishakha2108
I have sent a proposal for gsoc through the mailing list.I request a mentor to review it .
Prakhar Saxena
@Psycho-Pirate
I have some questions regarding risch algorithm, i have asked them on the mailing list. Please
Go through them
death-angel-141
@death-angel-141
The Implementation for Heaviside Function was not correct for Heaviside(0) for integers.So,I think its a bug.
mohit
@mohitshah3111999
hello everyone, My name is Mohit shah and I want to contribute to sympy during this year GSoC.
Arpan Chattopadhyay
@Arpan612
@mohitshah3111999 Hi Mohit, welcome to SymPy. Please find the links below to get started.
OmarWagih1
@OmarWagih1
Hello all, I am Omar Wagih and i was interested in contributing to the Benchmarking project for sympy during this summer GSoC, i noticed that there is no specific mentor linked to this project, i read all the contributing pages and the paper and would love to chat a bit on how we can further benchmark sympy and if there's any patches i can add pre-proposal to benchmark some functions as a trial.
SHUBHAM KHANTWAL
@shubham-khantwal
can anyone tell me what does '.' implies in "from .basic import Basic" ? As far i know we can also use from basic import Basic.
SHUBHAM KHANTWAL
@shubham-khantwal
And how do i check whether my changes are right or not in local system. on running a file in between say exprtools.py it is giving error may it import files from parent and could not move to the parent directory for importing a file