gnuastro-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnuastro-commits] master e0352a0f: Library (python.h): second component


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master e0352a0f: Library (python.h): second component of function names to python
Date: Tue, 30 Aug 2022 03:08:27 -0400 (EDT)

branch: master
commit e0352a0f631542b9afe44f877d10c65543ef6321
Author: Mohammad Akhlaghi <mohammad@akhlaghi.org>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>

    Library (python.h):  second component of function names to python
    
    Until now, the second component of the newly added Python installed
    functions in Gnuastro had the format of 'gal_py_XXXX'! However, the name of
    the C source code and header are 'python.c' and 'python.h'.
    
    With this commit, the names have been corrected to 'gal_python_XXXX' to
    follow the same convention as the rest of Gnuastro's installed functions in
    the library.
---
 NEWS                  | 4 ++--
 doc/gnuastro.texi     | 4 ++--
 lib/gnuastro/python.h | 4 ++--
 lib/python.c          | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/NEWS b/NEWS
index 8e43bb48..c3c9887d 100644
--- a/NEWS
+++ b/NEWS
@@ -115,8 +115,8 @@ See the end of the file for license conditions.
   - gal_list_data_select_by_name: select a dataset from a list by its name.
   - gal_list_str_cat: Concatenate (append) list to a space-separated string.
   - gal_list_str_extract: Extract space-separated tokens to a list.
-  - gal_py_type_from_numpy: Convert Numpy's type identifier to Gnuastro's.
-  - gal_py_type_to_numpy: Convert Gnuastro's type identifier to Numpy's.
+  - gal_python_type_from_numpy: Convert Numpy's type id. to Gnuastro's.
+  - gal_python_type_to_numpy: Convert Gnuastro's type id. to Numpy's.
   - gal_units_counts_to_sb: SB from counts, zeropoint and area.
   - gal_units_mag_to_sb: surface brightness (SB) from magnitude and area.
   - gal_units_sb_to_counts: counts from SB, zeropoint and area.
diff --git a/doc/gnuastro.texi b/doc/gnuastro.texi
index 78d9f688..b59e83e3 100644
--- a/doc/gnuastro.texi
+++ b/doc/gnuastro.texi
@@ -35870,11 +35870,11 @@ Writing an interfacing between these and Gnuastro can 
be simplified using the fu
 Since many of these functions depend on the Gnuastro Library itself, it is 
more convenient to package them with the Library to facilitate the work of 
Python package.
 These functions will be expanding as Gnuastro's own Python module (pyGnuastro) 
grows.
 
-@deftypefun int gal_py_type_to_numpy (uint8_t @code{type})
+@deftypefun int gal_python_type_to_numpy (uint8_t @code{type})
 Returns the NumPy datatype corresponding to a certain Gnuastro @code{type}, 
see @ref{Library data types}.
 @end deftypefun
 
-@deftypefun uint8_t gal_py_type_from_numpy (int @code{type})
+@deftypefun uint8_t gal_python_type_from_numpy (int @code{type})
 Returns Gnuastro's numerical datatype that correspondes to the input NumPy 
@code{type}.
 For Gnuastro's recognized data types, see @ref{Library data types}.
 @end deftypefun
diff --git a/lib/gnuastro/python.h b/lib/gnuastro/python.h
index 17a82257..16338a97 100644
--- a/lib/gnuastro/python.h
+++ b/lib/gnuastro/python.h
@@ -56,10 +56,10 @@ __BEGIN_C_DECLS  /* From C++ preparations */
  **************           Type codes           ***************
  *************************************************************/
 int
-gal_py_type_to_numpy(uint8_t type);
+gal_python_type_to_numpy(uint8_t type);
 
 uint8_t
-gal_py_type_from_numpy(int type);
+gal_python_type_from_numpy(int type);
 
 
 
diff --git a/lib/python.c b/lib/python.c
index 1a31c976..3d7d74bf 100644
--- a/lib/python.c
+++ b/lib/python.c
@@ -44,7 +44,7 @@ along with Gnuastro. If not, see 
<http://www.gnu.org/licenses/>.
 /* Convert Gnuastro type to NumPy datatype. Currently only converting types
    directly compatible between the two. */
 int
-gal_py_type_to_numpy(uint8_t type)
+gal_python_type_to_numpy(uint8_t type)
 {
   switch (type)
     {
@@ -74,7 +74,7 @@ gal_py_type_to_numpy(uint8_t type)
 /* Convert Numpy datatype to Gnuastro type. Currently only converting types
    directly compatible between the two. */
 uint8_t
-gal_py_type_from_numpy(int type)
+gal_python_type_from_numpy(int type)
 {
   switch (type)
     {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]