Skip to content

Conversation

ilayn
Copy link
Member

@ilayn ilayn commented Dec 12, 2023

#18358 finalized replicating the work that these old Fortran files were used for. This PR removes the files themselves.

@ilayn ilayn added scipy.linalg maintenance Items related to regular maintenance tasks Fortran Items related to the internal Fortran code base labels Dec 12, 2023
@ilayn ilayn added this to the 1.13.0 milestone Dec 12, 2023
@ilayn ilayn requested a review from larsoner as a code owner December 12, 2023 18:51
@j-bowhay
Copy link
Member

j-bowhay commented Dec 12, 2023

Opinions on also getting rid of flinalg.py and _flinalg.py too? Last time around there was some concerns about the 2.0.0 deprecation warning. Since then, the only two functions left now have a warning saying they will be removed in this release as they are not part of the linalg namespace which would leave an empty module so seems a little pointless to leave around

In [2]: scipy.linalg.flinalg.__all__
Out[2]: ['get_flinalg_funcs', 'has_column_major_storage']

In [3]: scipy.linalg.flinalg.get_flinalg_funcs
<ipython-input-3-2f187ec6e743>:1: DeprecationWarning: `scipy.linalg.flinalg.get_flinalg_funcs` is deprecated along with the `scipy.linalg.flinalg` namespace. `scipy.linalg.flinalg.get_flinalg_funcs` will be removed in SciPy 1.13.0, and the `scipy.linalg.flinalg` namespace will be removed in SciPy 2.0.0.
  scipy.linalg.flinalg.get_flinalg_funcs
Out[3]: <function scipy.linalg._flinalg_py.get_flinalg_funcs(names, arrays=(), debug=0)>

In [4]: scipy.linalg.flinalg.has_column_major_storage
<ipython-input-4-e9709a88fd27>:1: DeprecationWarning: `scipy.linalg.flinalg.has_column_major_storage` is deprecated along with the `scipy.linalg.flinalg` namespace. `scipy.linalg.flinalg.has_column_major_storage` will be removed in SciPy 1.13.0, and the `scipy.linalg.flinalg` namespace will be removed in SciPy 2.0.0.
  scipy.linalg.flinalg.has_column_major_storage
Out[4]: <function scipy.linalg._flinalg_py.has_column_major_storage(arr)>

@ilayn
Copy link
Member Author

ilayn commented Dec 12, 2023

Oh I completely forgot those. Let me check what they do.

@ilayn
Copy link
Member Author

ilayn commented Dec 12, 2023

so seems a little pointless to leave around

I agree, removed them now.

@lucascolley
Copy link
Member

lucascolley commented Dec 12, 2023

flinalg also has references in mypy.ini, scipy\_lib\tests\test_public_api.py, scipy\linalg\__init__.py, scipy\linalg\_basic.py, scipy\linalg\basic.py, and scipy\linalg\decomp_lu.py.

edit: happy to make a PR to your branch if you'd prefer

@ilayn
Copy link
Member Author

ilayn commented Dec 12, 2023

Oh my if it is not a hassle please go ahead, I don't know how I missed them. Thanks for the drill down though.

@lucascolley
Copy link
Member

lucascolley commented Dec 12, 2023

CI happy (not sure what's up with Cirrus), just need to decide whether

# XXX: I found no advantage or disadvantage of using finv.
# finv, = get_flinalg_funcs(('inv',),(a1,))
# if finv is not None:
# a_inv,info = finv(a1,overwrite_a=overwrite_a)
# if info==0:
# return a_inv
# if info>0: raise LinAlgError, "singular matrix"
# if info<0: raise ValueError('illegal value in %d-th argument of '
# 'internal inv.getrf|getri'%(-info))
should stay/be reworded/be deleted.

@ilayn
Copy link
Member Author

ilayn commented Dec 13, 2023

That comment has no relevance anymore hence I removed it. It was when we tried to use F or C linalg based on the array flag but that's long gone.

Copy link
Member

@j-bowhay j-bowhay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks both! Nice to see ~600 lines go

@j-bowhay j-bowhay merged commit 35f3d3f into scipy:main Dec 13, 2023
@ilayn ilayn deleted the remove_flinalg branch December 13, 2023 20:31
@ilayn
Copy link
Member Author

ilayn commented Dec 13, 2023

Thanks @lucascolley for the emergency save, @j-bowhay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fortran Items related to the internal Fortran code base maintenance Items related to regular maintenance tasks scipy.linalg
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants