Opened 5 years ago

Closed 5 years ago

#22402 closed defect (fixed)

p_part return value may not be polynomial

Reported by: rrissner Owned by:
Priority: major Milestone: sage-7.6
Component: linear algebra Keywords:
Cc: ​cheuberg Merged in:
Authors: Roswitha Rissner Reviewers: Clemens Heuberger
Report Upstream: N/A Work issues:
Branch: 0c155a3 (Commits, GitHub, GitLab) Commit: 0c155a31cfe8a575f6a5ac0ea8efb6acf0982743
Dependencies: Stopgaps:

Status badges

Description (last modified by rrissner)

p_part does not return polynomial if the result is 0

sage: from sage.matrix.compute_J_ideal import p_part
sage: X = polygen(ZZ)
sage: g = p_part(X+1,2)
sage: g.parent()

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_16.py", line 10, in <module>
    exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("WCA9IHBvbHlnZW4oWlopCmcgPSBwX3BhcnQoWCsxLDIpCmcucGFyZW50KCk="),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>
    
  File "/tmp/tmpDwvS0x/___code___.py", line 5, in <module>
    exec compile(u'g.parent()
  File "", line 1, in <module>
    
AttributeError: 'int' object has no attribute 'parent'

Return value of p_part should always be a polynomial.

Change History (10)

comment:1 Changed 5 years ago by rrissner

  • Authors set to Roswitha Rissner
  • Cc Clemens Heuberger added
  • Component changed from PLEASE CHANGE to linear algebra
  • Description modified (diff)
  • Summary changed from p_part bug to p_part return value may not be polynomial
  • Type changed from PLEASE CHANGE to defect

comment:2 Changed 5 years ago by rrissner

  • Cc ​cheuberg added; Clemens Heuberger removed

comment:3 Changed 5 years ago by rrissner

  • Branch set to u/rrissner/p_part_bug

comment:4 Changed 5 years ago by git

  • Commit set to 682995f5813ea990ce100947347ccb3b82fb9076

Branch pushed to git repo; I updated commit sha1. New commits:

682995fadded missing space character

comment:5 Changed 5 years ago by rrissner

  • Status changed from new to needs_review

comment:6 Changed 5 years ago by cheuberg

  • Branch changed from u/rrissner/p_part_bug to u/cheuberg/p_part_bug

comment:7 Changed 5 years ago by git

  • Commit changed from 682995f5813ea990ce100947347ccb3b82fb9076 to 0c155a31cfe8a575f6a5ac0ea8efb6acf0982743

Branch pushed to git repo; I updated commit sha1. New commits:

0c155a3Trac #22402: PEP8: fix trailing whitespace

comment:8 Changed 5 years ago by cheuberg

  • Reviewers set to Clemens Heuberger

LGTM. I added a reviewer commit (PEP8). Let's wait for a patchbot before setting to positive.

comment:9 Changed 5 years ago by cheuberg

  • Status changed from needs_review to positive_review

comment:10 Changed 5 years ago by vbraun

  • Branch changed from u/cheuberg/p_part_bug to 0c155a31cfe8a575f6a5ac0ea8efb6acf0982743
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.