Modulo function from python to julia efficiency -
In Python I get an array with no value for modules for z to set it to x and y Can be used to: Import
as np y = np.asarray ([1,2,3,4,5,6,7,8,9,10 , 11]) x = 2 z = y [: [1 2 3 4 5 6 7 8 9 10]: lane (y)% x * -1] print (z)
Output:
Instead of doing this, Julia is a more effective way of writing variables z
:
y = [1, 2,3,4,5,6,7,8,9,10,11] x = 2 z = y [1: (L) By (y) - (length (y)% x)] println (z)
Output:
[1,2,3,4 , 5,6,7,8,9,10]
end , such as< / Div>
Comments
Post a Comment