ncrystal-python 4.4.4__py3-none-any.whl → 4.4.6__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
NCrystal/__init__.py CHANGED
@@ -55,7 +55,7 @@ For detailed usage conditions and licensing of this open source project, see:
55
55
 
56
56
  #NB: Synchronize meta-data below with fields in setup.py+template_setup.py.in meta data:
57
57
  __license__ = "Apache 2.0, http://www.apache.org/licenses/LICENSE-2.0"
58
- __version__ = '4.4.4'
58
+ __version__ = '4.4.6'
59
59
  __status__ = "Production"
60
60
  __author__ = "NCrystal developers (Thomas Kittelmann, Xiao Xiao Cai)"
61
61
  __copyright__ = "Copyright 2015-2024 %s"%__author__
@@ -567,7 +567,7 @@ class NuclearData():
567
567
  # contain numbers that cannot be represented
568
568
  # as distinct FORTRAN reals in the ENDF-6 file
569
569
  #
570
- sab.shape = (beta.size, alpha.size)
570
+ sab = sab.reshape(beta.size, alpha.size)
571
571
  sab_int = _interp2d(self._elems[sym].alpha*T0/T,
572
572
  self._elems[sym].beta_total*T0/T,
573
573
  alpha, beta, sab.transpose()).transpose()
@@ -762,7 +762,7 @@ class EndfFile():
762
762
  # S(a,b) for negative beta
763
763
  # get negative branch of S(a,b)
764
764
  sab_sym2 = sab_total[_np.where(beta_grid<=0)]
765
- sab_sym2.shape = (len(beta), len(alpha))
765
+ sab_sym2 = sab_sym2.reshape(len(beta), len(alpha))
766
766
  sab_sym3 = sab_sym2[::-1,:] # Invert S(a,b) for negative beta
767
767
  sab_data.append(sab_sym3.transpose())
768
768
  continue
@@ -776,7 +776,7 @@ class EndfFile():
776
776
  sab_sym = sab_total*detailed_balance_factor
777
777
  # get negative branch of S(a,b)
778
778
  sab_sym2 = sab_sym[_np.where(beta_grid<=0)]
779
- sab_sym2.shape = (len(beta), len(alpha))
779
+ sab_sym2 = sab_sym2.reshape(len(beta), len(alpha))
780
780
  # Invert S(a,b) for negative beta
781
781
  sab_sym3 = sab_sym2[::-1,:]
782
782
  sab_data.append(sab_sym3.transpose())
NCrystal/_ncmatimpl.py CHANGED
@@ -2062,14 +2062,21 @@ def _cifdata_via_ase( data_or_file, ase_format = None, quiet = False ):
2062
2062
  ase_format = 'cif'
2063
2063
  assert isinstance(ase_format,str)
2064
2064
  prfct('Attempting to load data via ASE')
2065
- if dof_str:
2066
- assert isinstance(dof_str,str)
2067
- with io.StringIO(dof_str) as memfile:
2068
- ase_obj = ase_io.read( memfile, format = ase_format )
2069
- else:
2070
- assert isinstance(dof_bytes,bytes)
2071
- with io.BytesIO(dof_bytes) as memfile:
2072
- ase_obj = ase_io.read( memfile, format = ase_format )
2065
+ #Temporary workaround to quiet a DeprecationWarning from Numpy 2.5+
2066
+ #(jun2026) triggered by ASE. We can remove it again in a few years:
2067
+ import warnings
2068
+ with warnings.catch_warnings():
2069
+ warnings.filterwarnings( "ignore", category=DeprecationWarning,
2070
+ message=('.*Setting the shape on a NumPy'
2071
+ ' array has been deprecated.*'))
2072
+ if dof_str:
2073
+ assert isinstance(dof_str,str)
2074
+ with io.StringIO(dof_str) as memfile:
2075
+ ase_obj = ase_io.read( memfile, format = ase_format )
2076
+ else:
2077
+ assert isinstance(dof_bytes,bytes)
2078
+ with io.BytesIO(dof_bytes) as memfile:
2079
+ ase_obj = ase_io.read( memfile, format = ase_format )
2073
2080
 
2074
2081
  assert ase_obj is not None
2075
2082
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ncrystal-python
3
- Version: 4.4.4
3
+ Version: 4.4.6
4
4
  Summary: Library for thermal neutron transport in crystals and other materials.
5
5
  Author: NCrystal developers (Thomas Kittelmann, Xiao Xiao Cai)
6
6
  License:
@@ -1,4 +1,4 @@
1
- NCrystal/__init__.py,sha256=YKxRrxhOyeKGk27SeCYjh8nGTSXLVOwOSNG9SDEDlug,4151
1
+ NCrystal/__init__.py,sha256=Ci1KrYeZh-D-bpb3Ls00qRCQHVTSBwJw4ZV3eitbnoE,4151
2
2
  NCrystal/__main__.py,sha256=oYk085KH-byQDyHDFiJ9eI_h5tvwN8yJ8CgjIqZSpbw,3624
3
3
  NCrystal/_chooks.py,sha256=ntNys5hOUYgKwq95J8ny-EUMKf5PF35SKuAvPMoLiaw,45242
4
4
  NCrystal/_cli_cif2ncmat.py,sha256=YaCHkN5qTQsRtftmayv-QQBnvjZ2x1Rs6F_LHJ6qZCw,14787
@@ -28,8 +28,8 @@ NCrystal/_mmc_doc.py,sha256=JF0PgyD4BJADJv3wN8vX-v5rIEEaMXXd6vToLt96Nuk,19458
28
28
  NCrystal/_mmc_impl.py,sha256=ogBq9WyjSLlYvVRHEYwt3iNL7F315e8Hq6o6uYUSJBo,17582
29
29
  NCrystal/_msg.py,sha256=E4oO1AtTiGa6Osa46n8WX9mUmi6PR3Wsg_6unS8zf1U,2624
30
30
  NCrystal/_ncmat2cpp_impl.py,sha256=_kEeOVTPT-E2kIF2Eccy4o-1htJjmXlkM9dQbwOBalk,18383
31
- NCrystal/_ncmat2endf_impl.py,sha256=dAVAwo29EuTRsiyCGw4eqlesSrOB5E2GCxR5wjahV6g,62918
32
- NCrystal/_ncmatimpl.py,sha256=gwJ4gYl3PR_7Mr7QMcTroyh9Pj6zaZvaJ5E9C6awFPE,96188
31
+ NCrystal/_ncmat2endf_impl.py,sha256=qJykhTnVYxoaYNlgK2Pzhz1I0KqijcY65oPazDWwqKc,62943
32
+ NCrystal/_ncmatimpl.py,sha256=rlsSxasE-2odsfsW4uc4KWVRfvF8DjbOJa6YiKWWlKQ,96670
33
33
  NCrystal/_numpy.py,sha256=Mfu2orb5f-q18-ccop6wiswZNGuQzqLCOzmFuDv-WGg,2924
34
34
  NCrystal/_sabutils.py,sha256=yTmr6cIsSqTQEItJqytWJ4dwweO_8uMSy4nTstJMpVw,4798
35
35
  NCrystal/_testimpl.py,sha256=ATMUoCJnolTXYwxnF_k7D4VLPYtHmNKeY-6xOaqDock,21743
@@ -57,9 +57,9 @@ NCrystal/plot.py,sha256=zndm1GT5VBVyKHHEVyJoccnfuGkHDRvs2PsblxGUEK4,28473
57
57
  NCrystal/plugins.py,sha256=jdyNHHjS6qJtisy1tqeWBidCSX1UX797hQFNEmqN50Y,2440
58
58
  NCrystal/test.py,sha256=ogLLfvXoTR_KiX0SWAFkqXSUDAzlgH_0cDPIVdqU2y8,2731
59
59
  NCrystal/vdos.py,sha256=PzP0abjpj9vW1JWSh-qY0_LSYSTwRXVvYrnkQOa9IfQ,47332
60
- ncrystal_python-4.4.4.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
61
- ncrystal_python-4.4.4.dist-info/METADATA,sha256=GGhZqEl5uIeK_QM6CVuJmlxxNZJN-tyQ88_kXGLmDkw,16274
62
- ncrystal_python-4.4.4.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
63
- ncrystal_python-4.4.4.dist-info/entry_points.txt,sha256=GPVTPLWJz1NCRMTEA0SjBrn8d-o0G57uzz885qA54Uc,642
64
- ncrystal_python-4.4.4.dist-info/top_level.txt,sha256=VIJdIQMfLIbKpFXA8xm0fKY5okz8s5IHrZTYDSH18y0,9
65
- ncrystal_python-4.4.4.dist-info/RECORD,,
60
+ ncrystal_python-4.4.6.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
61
+ ncrystal_python-4.4.6.dist-info/METADATA,sha256=reNC_Tif2vpv9l4_mebd6nXoYNXJeMKsppiyuxxRTc8,16274
62
+ ncrystal_python-4.4.6.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
63
+ ncrystal_python-4.4.6.dist-info/entry_points.txt,sha256=GPVTPLWJz1NCRMTEA0SjBrn8d-o0G57uzz885qA54Uc,642
64
+ ncrystal_python-4.4.6.dist-info/top_level.txt,sha256=VIJdIQMfLIbKpFXA8xm0fKY5okz8s5IHrZTYDSH18y0,9
65
+ ncrystal_python-4.4.6.dist-info/RECORD,,