#18481: Allow matrix subdivide to optionally return a copy
-------------------------------------+-------------------------------------
Reporter: rbeezer | Owner:
Type: enhancement | Status: needs_info
Priority: minor | Milestone: sage-6.9
Component: linear algebra | Resolution:
Keywords: matrix subdivide | Merged in:
copy | Reviewers: Vincent Delecroix
Authors: | Work issues:
Report Upstream: N/A | Commit:
Branch: u/rbeezer/matrix- | e974b54136e531ca6040455a1f5af72dc0a3a234
copy-on-subdivide | Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Changes (by vdelecroix):
* status: needs_review => needs_info
* reviewer: => Vincent Delecroix
* milestone: sage-6.8 => sage-6.9
Comment:
Argh. There is always a choice between `inplace` and `copy` argument... we
should definitely fix the standard for Sage. A very rough search gives
{{{
$ grep "^[[:space:]]*def [a-zA-Z0-9_]*(" $(find . -name "*.py") | grep
"copy="
./matrix/matrix_space.py: def __call__(self, entries=None, coerce=True,
copy=True, sparse = False):
./matrix/matrix_space.py: def matrix(self, x=0, coerce=True,
copy=True):
./combinat/combinat.py: def __init__(self, l, copy=True):
./combinat/designs/group_divisible_designs.py: def __init__(self,
points, groups, blocks, G=None, K=None, lambd=1, check=True,
copy=True,**kwds):
./combinat/designs/bibd.py: def __init__(self, points, blocks, K=None,
lambd=1, check=True, copy=True,**kwds):
./combinat/designs/bibd.py: def __init__(self, points, blocks, k=None,
lambd=1, check=True, copy=True,**kwds):
./graphs/generic_graph.py: def networkx_graph(self, copy=True):
./modules/free_module.py: def _element_constructor_(self, x,
coerce=True, copy=True, check=True):
./geometry/newton_polygon.py: def vertices(self, copy=True):
}}}
against
{{{
e$ grep "^[[:space:]]*def [a-zA-Z0-9_]*(" $(find . -name "*.py") | grep
"inplace="
./combinat/root_system/dynkin_diagram.py: def relabel(self,
relabelling, inplace=False, **kwds):
./combinat/ordered_tree.py: def normalize(self, inplace=False):
./combinat/ordered_tree.py: def dendrog_normalize(self, inplace=False):
./combinat/cluster_algebra_quiver/cluster_seed.py: def mutate(self,
sequence, inplace=True):
./combinat/cluster_algebra_quiver/quiver.py: def
principal_extension(self, inplace=False):
./combinat/cluster_algebra_quiver/quiver.py: def mutate(self, data,
inplace=True):
./combinat/designs/incidence_structures.py: def relabel(self,
perm=None, inplace=True):
./combinat/yang_baxter_graph.py: def relabel_vertices(self, v,
relabel_operator, inplace=True):
./combinat/yang_baxter_graph.py: def relabel_edges(self, edge_dict,
inplace=True):
./combinat/yang_baxter_graph.py: def relabel_vertices(self, v,
inplace=True):
./graphs/digraph.py: def reverse_edge(self, u, v=None, label=None,
inplace=True, multiedges=None):
./graphs/digraph.py: def reverse_edges(self, edges, inplace=True,
multiedges=None):
./graphs/generic_graph.py: def subgraph(self, vertices=None,
edges=None, inplace=False,
./graphs/generic_graph.py: def _subgraph_by_deleting(self,
vertices=None, edges=None, inplace=False,
./graphs/generic_graph.py: def random_subgraph(self, p, inplace=False):
./graphs/generic_graph.py: def relabel(self, perm=None, inplace=True,
return_map=False, check_input = True, complete_partial_function = True):
./graphs/generic_graph.py:def
graph_isom_equivalent_non_edge_labeled_graph(g, partition=None,
standard_label=None, return_relabeling=False, return_edge_labels=False,
inplace=False, ignore_edge_labels=False):
./modular/arithgroup/arithgroup_perm.py: def relabel(self,
inplace=True):
}}}
What do you think? Is it worth opening a thread on sage-devel?
Vincent
--
Ticket URL: <http://trac.sagemath.org/ticket/18481#comment:6>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.