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.
This pull request includes changes to the
brainunit/_base.py
file, primarily focusing on commenting out thefactorless()
method calls across various functions and methods. This adjustment aims to simplify the code by removing the need to strip units fromQuantity
objects before performing operations.Key changes include:
Code Simplification:
Commented out
factorless()
method calls in functions that wrap other functions, such as_wrap_function_keep_unit
,_wrap_function_change_unit
, and_wrap_function_remove_unit
. [1] [2] [3]Commented out
factorless()
method calls in property methods likeimag
,real
, andT
. [1] [2]Commented out
factorless()
method calls in various mathematical and array manipulation methods such asscatter_add
,scatter_mul
,scatter_div
,scatter_max
,scatter_min
, and__len__
. [1] [2] [3] [4] [5] [6]Commented out
factorless()
method calls in various arithmetic and bitwise operation methods such as__pow__
,__rpow__
,__lshift__
,__rlshift__
,__ilshift__
,__rshift__
,__rrshift__
,__irshift__
,__round__
,round
,astype
,clip
,conj
,conjugate
,copy
,dot
,fill
,flatten
,item
,prod
,nanprod
,cumprod
,nancumprod
,put
,repeat
,reshape
,resize
,sort
,squeeze
,swapaxes
,split
, andtake
. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17]