Skip to content

Commit

Permalink
fixed ApplyToSection to correctly deal with empty matrix operator
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamed-barakat committed Feb 28, 2015
1 parent e5050c9 commit ee230ea
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Subtitle := "A homalg based package for D-modules",
## See '?Extending: Version Numbers' in GAP help for an explanation
## of valid version numbers. For an automatic package distribution update
## you must provide a new version number even after small changes.
Version := "2014.07.05",
Version := "2015.02.11",
## Please adjust also the VERSION file in the package directory when
## changing this.

Expand Down
10 changes: 8 additions & 2 deletions gap/Tools.gi
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,16 @@ InstallMethod( ApplyToSection,
[ IsHomalgMatrix, IsHomalgMatrix ],

function( mat, u )
local R, RP, sec;
local R, r, RP, sec;

R := HomalgRing( mat );

r := NrRows( mat );

if r = 0 then
return HomalgZeroMatrix( r, 1, R );
fi;

RP := homalgTable( R );

if not IsBound( RP!.ApplyToSection ) then
Expand All @@ -69,7 +75,7 @@ InstallMethod( ApplyToSection,

sec := RP!.ApplyToSection( mat, u ); ## the external object

return HomalgMatrix( sec, NrRows( mat ), 1, R );
return HomalgMatrix( sec, r, 1, R );

end );

Expand Down

0 comments on commit ee230ea

Please sign in to comment.