[ITensors] Qualify overloading NDTensors.Tensor
#1648
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixing a warning and an error revealed for
julia 1.12-beta1. In particular:NDTensorsforTensorconstructor fromITensorsCompat.get_num_threadstoBLAS.get_num_threadssince first one is deprecated.contract_threads:threadidgoes fromnthreads(:interactive) .+ 1:nthreads(:default)as reported innthreads. The error was not spotted previously case the number of interactive threads was defaulted to0, but now the default value is1as reported in the News. Note that this fixes the error, butthreadiddocumentation suggest to don't use it for indexing arrays.All the modifications should be still compatible with
julia 1.11.5.Fixes #1647
How Has This Been Tested?
Please add tests that verify your changes to a file in the
testdirectory.Please give a summary of the tests that you added to verify your changes.
Checklist:
using JuliaFormatter; format(".")in the base directory of the repository (~/.julia/dev/ITensors) to format your code according to our style guidelines.