Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a1ba1a1

Browse files
authored
Merge pull request #1620 from ADV1K/chore/rename-ltypes-to-lpython
Rename ltypes.py to lpython.py
2 parents f0bb48a + 4d4bcd1 commit a1ba1a1

File tree

426 files changed

+535
-535
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

426 files changed

+535
-535
lines changed

integration_tests/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ macro(RUN)
118118

119119
add_test(${name} python ${CMAKE_CURRENT_SOURCE_DIR}/${name}.py)
120120
set_tests_properties(${name} PROPERTIES
121-
ENVIRONMENT "PYTHONPATH=${CMAKE_SOURCE_DIR}/../src/runtime/ltypes:${CMAKE_SOURCE_DIR}/..;LPYTHON_PY_MOD_NAME=${PY_MOD};LPYTHON_PY_MOD_PATH=${CMAKE_CURRENT_BINARY_DIR}")
121+
ENVIRONMENT "PYTHONPATH=${CMAKE_SOURCE_DIR}/../src/runtime/lpython:${CMAKE_SOURCE_DIR}/..;LPYTHON_PY_MOD_NAME=${PY_MOD};LPYTHON_PY_MOD_PATH=${CMAKE_CURRENT_BINARY_DIR}")
122122
if (RUN_LABELS)
123123
set_tests_properties(${name} PROPERTIES LABELS "${RUN_LABELS}")
124124
endif()

integration_tests/array_01.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i32
1+
from lpython import i32
22
from numpy import empty
33

44
def main0():

integration_tests/array_01_decl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i16, i32, i64, f32, f64, c32, c64
1+
from lpython import i16, i32, i64, f32, f64, c32, c64
22
from numpy import empty, int16, int32, int64, float32, float64, complex64, complex128
33
from enum import Enum
44

integration_tests/array_02.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i32
1+
from lpython import i32
22
from numpy import empty
33

44
def main0():

integration_tests/array_02_decl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i32, i64, f32, f64, c32, c64
1+
from lpython import i32, i64, f32, f64, c32, c64
22
from numpy import empty
33

44
def accept_multidim_i32_array(xi32: i32[:, :]) -> i32:

integration_tests/array_03_decl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i32, f64, dataclass
1+
from lpython import i32, f64, dataclass
22
from numpy import empty
33

44
@dataclass

integration_tests/array_expr_01.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i32, f32, f64
1+
from lpython import i32, f32, f64
22
from numpy import empty, reshape, int32, float64
33

44
def array_expr_01():

integration_tests/array_expr_02.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i32, f32, TypeVar
1+
from lpython import i32, f32, TypeVar
22
from numpy import empty, sqrt, float32
33

44
n: i32

integration_tests/bindc_01.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import c_p_pointer, CPtr, i16, Pointer, empty_c_void_p
1+
from lpython import c_p_pointer, CPtr, i16, Pointer, empty_c_void_p
22

33
queries: CPtr = empty_c_void_p()
44
x: Pointer[i16] = c_p_pointer(queries, i16)

integration_tests/bindc_02.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import c_p_pointer, CPtr, pointer, i16, Pointer, empty_c_void_p
1+
from lpython import c_p_pointer, CPtr, pointer, i16, Pointer, empty_c_void_p
22
from numpy import empty, int16
33

44
queries: CPtr = empty_c_void_p()

integration_tests/bindc_03.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import c_p_pointer, CPtr, pointer, i32, Pointer, ccall, p_c_pointer, dataclass
1+
from lpython import c_p_pointer, CPtr, pointer, i32, Pointer, ccall, p_c_pointer, dataclass
22

33
@dataclass
44
class ArrayWrapped:

integration_tests/bindc_04.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import pointer, i16, Pointer
1+
from lpython import pointer, i16, Pointer
22

33
# Testing Global Pointers
44
x: Pointer[i16[:]]

integration_tests/bindc_05.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import CPtr, empty_c_void_p, i32, f32, dataclass, Pointer, ccall, p_c_pointer, pointer
1+
from lpython import CPtr, empty_c_void_p, i32, f32, dataclass, Pointer, ccall, p_c_pointer, pointer
22

33
@dataclass
44
class Void:

integration_tests/bindc_06.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i32, f64, ccall, dataclass
1+
from lpython import i32, f64, ccall, dataclass
22
from numpy import empty, int32, float64
33

44
@dataclass

integration_tests/bindc_07.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import CPtr, i64, sizeof, i32, i16, i8, ccall, c_p_pointer, empty_c_void_p, Pointer, pointer
1+
from lpython import CPtr, i64, sizeof, i32, i16, i8, ccall, c_p_pointer, empty_c_void_p, Pointer, pointer
22
from numpy import empty, int64
33

44
@ccall

integration_tests/bit_operations_i32.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i32
1+
from lpython import i32
22

33
def test_bitnot():
44
x: i32 = 5

integration_tests/bit_operations_i64.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i64
1+
from lpython import i64
22

33
def test_bitnot():
44
x: i64 = i64(123)

integration_tests/comp_01.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i32, f64
1+
from lpython import i32, f64
22

33
def compI32(x: i32, y: i32):
44
print(x)

integration_tests/const_01.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import Const, i32, i64, f32, f64
1+
from lpython import Const, i32, i64, f32, f64
22

33
def test_const_variables():
44
xci: Const[i32] = i32(0.0)

integration_tests/const_02.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i32, f64, Const
1+
from lpython import i32, f64, Const
22

33
def f(x: Const[i32]) -> i32:
44
return x + 1

integration_tests/const_03.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i64, f64, i32, Const, ccall
1+
from lpython import i64, f64, i32, Const, ccall
22

33
CONST_1: Const[f64] = 32.0
44
CONST_2: Const[f64] = CONST_1 * 2.0

integration_tests/const_04.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i32, i16, Const
1+
from lpython import i32, i16, Const
22
from numpy import empty, int16
33

44
def sum_const_array(array: Const[i16[:]], size: i32) -> i16:

integration_tests/elemental_01.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i32, f64, f32
1+
from lpython import i32, f64, f32
22
from numpy import empty, sin, cos, reshape
33

44
def verify1d(array: f32[:], result: f32[:], size: i32):

integration_tests/elemental_02.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i32, f64, f32
1+
from lpython import i32, f64, f32
22
from numpy import empty, tan, sin, cos, reshape
33

44
def elemental_tan64():

integration_tests/elemental_03.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i32, f32, f64
1+
from lpython import i32, f32, f64
22
from numpy import empty, sqrt, reshape
33

44
def elemental_sqrt64():

integration_tests/elemental_04.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i32, f32, f64
1+
from lpython import i32, f32, f64
22
from numpy import empty, log, log10, log2, reshape
33
from math import exp
44

integration_tests/elemental_05.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i32, f64, f32
1+
from lpython import i32, f64, f32
22
from numpy import empty, sinh, cosh, reshape, int32, float64, sin
33

44
def verify1d(array: f32[:], result: f32[:], size: i32):

integration_tests/elemental_06.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i32, f32, f64
1+
from lpython import i32, f32, f64
22
from numpy import empty, arcsin, arccos, sin, cos, sqrt, arctan, tan, degrees, radians
33
from math import pi
44

integration_tests/elemental_07.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i32, f64, f32
1+
from lpython import i32, f64, f32
22
from numpy import empty, tanh, reshape, int32, float64, sin, log10
33

44
def verify1d(array: f32[:], result: f32[:], size: i32):

integration_tests/elemental_08.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i32, f64, f32
1+
from lpython import i32, f64, f32
22
from numpy import empty, reshape, int32, exp
33

44
def verify1d(array: f32[:], result: f32[:], size: i32):

integration_tests/elemental_09.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i32, f64, f32
1+
from lpython import i32, f64, f32
22
from numpy import empty, arcsinh, arccosh, reshape, float64, sinh, sqrt, sin, cosh
33

44
def verify1d_arcsinh(array: f32[:], result: f32[:], size: i32):

integration_tests/elemental_10.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i32, i64, f64
1+
from lpython import i32, i64, f64
22
from numpy import mod, int64, empty
33

44
def test_numpy_mod():

integration_tests/elemental_11.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i32, f64, f32
1+
from lpython import i32, f64, f32
22
from numpy import empty, arctanh, reshape, float64, sinh, sqrt, sin, cosh
33

44
def verify1d_arctanh(array: f32[:], result: f32[:], size: i32):

integration_tests/elemental_12.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i32, f32, f64
1+
from lpython import i32, f32, f64
22
from numpy import empty, floor, ceil, sqrt, reshape
33

44
def elemental_floor64():

integration_tests/enum_01.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i32
1+
from lpython import i32
22
from enum import Enum
33

44
class Color(Enum):

integration_tests/enum_02.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from enum import Enum
2-
from ltypes import i32, f64
2+
from lpython import i32, f64
33

44
class MolecularMass(Enum):
55
water: i32 = 18

integration_tests/enum_03.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from enum import Enum
2-
from ltypes import i32
2+
from lpython import i32
33

44
class NegativeNumbers(Enum):
55
a: i32 = -1

integration_tests/enum_04.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i32
1+
from lpython import i32
22
from enum import Enum, auto
33

44
class Color(Enum):

integration_tests/enum_05.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i32, ccall
1+
from lpython import i32, ccall
22
from enum import Enum
33

44
@ccall

integration_tests/enum_06.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i32, dataclass, f64
1+
from lpython import i32, dataclass, f64
22
from numpy import empty
33
from enum import Enum
44

integration_tests/expr_01.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import inline, i32
1+
from lpython import inline, i32
22

33
@inline
44
def add(x: i32, y: i32) -> i32:

integration_tests/expr_04.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i32, f32, f64, i64
1+
from lpython import i32, f32, f64, i64
22
def main0():
33
i: i32
44
sum: i32

integration_tests/expr_05.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i32, i64
1+
from lpython import i32, i64
22

33
def test_multiply(a: i32, b: i32) -> i32:
44
return a*b

integration_tests/expr_06.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i32, f32, f64
1+
from lpython import i32, f32, f64
22
from numpy import empty, cos, sin
33

44
def main0():

integration_tests/expr_07.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i32
1+
from lpython import i32
22

33
def g(x: i32):
44
print(x)

integration_tests/expr_08.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import pointer, i16, Pointer
1+
from lpython import pointer, i16, Pointer
22

33
# Testing Global Pointers
44
x: Pointer[i16[:]]

integration_tests/expr_09.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i32, f64, f32
1+
from lpython import i32, f64, f32
22

33
def main0():
44
i1: i32 = 10

integration_tests/expr_10.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i32
1+
from lpython import i32
22

33
def g() -> i32:
44
return 5

integration_tests/expr_11.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i32
1+
from lpython import i32
22

33
def f():
44
i: i32

integration_tests/expr_12.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import pointer, i16, Pointer
1+
from lpython import pointer, i16, Pointer
22

33
def g(x: Pointer[i16[:]], y: i16[:]):
44
y[0] = i16(1)

integration_tests/expr_13.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import CPtr, empty_c_void_p, i32, Pointer, ccall, Const
1+
from lpython import CPtr, empty_c_void_p, i32, Pointer, ccall, Const
22

33
@ccall
44
def deref_array(x: Pointer[CPtr], idx: i32) -> CPtr:

integration_tests/expr_14.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i32, i64, f32, f64, c32, c64
1+
from lpython import i32, i64, f32, f64, c32, c64
22

33
def test_divide():
44
a1: i32; a2: i32; a3: f64;

integration_tests/expr_15.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i8, i16
1+
from lpython import i8, i16
22

33
def test_issue_1586():
44
x4: i16

integration_tests/float_01.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import f64
1+
from lpython import f64
22

33
def sqr(x: f64) -> f64:
44
return x * x

integration_tests/func_dep_03.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i32, i64
1+
from lpython import i32, i64
22

33
def casti32(x: i64) -> i32:
44
y: i32

integration_tests/func_dep_04.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from func_dep_04_module import manhattan_distance
2-
from ltypes import i32
2+
from lpython import i32
33

44
def test_manhattan_distance():
55
a: i32; b: i32; c: i32; d: i32;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i32
1+
from lpython import i32
22

33
def manhattan_distance(x1: i32, y1: i32, x2: i32, y2: i32) -> i32:
44
return abs(x1 - x2) + abs(y1 - y2)

integration_tests/func_inline_01.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i64
1+
from lpython import i64
22

33
def fib(n: i64) -> i64:
44
if n < i64(2):

integration_tests/func_inline_02.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i32, Const, inline
1+
from lpython import i32, Const, inline
22

33
@inline
44
def f(x: i32) -> i32:

integration_tests/func_static_01.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i64, static
1+
from lpython import i64, static
22

33
@static
44
def fib(n: i64) -> i64:

integration_tests/func_static_02.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import i64, static, inline
1+
from lpython import i64, static, inline
22

33
@static
44
@inline

integration_tests/generics_01.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import TypeVar, restriction, i32
1+
from lpython import TypeVar, restriction, i32
22

33
T = TypeVar('T')
44

integration_tests/generics_02.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import TypeVar
1+
from lpython import TypeVar
22

33
T = TypeVar('T')
44

integration_tests/generics_array_01.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import TypeVar, i32
1+
from lpython import TypeVar, i32
22
from numpy import empty
33

44
T = TypeVar('T')

integration_tests/generics_array_02.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ltypes import TypeVar, restriction, i32, f32
1+
from lpython import TypeVar, restriction, i32, f32
22
from numpy import empty
33

44
n: i32

0 commit comments

Comments
 (0)