kececinumbers 0.5.7__tar.gz → 0.5.9__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kececinumbers
3
- Version: 0.5.7
3
+ Version: 0.5.9
4
4
  Summary: Keçeci Numbers: An Exploration of a Dynamic Sequence Across Diverse Number Sets
5
5
  Home-page: https://github.com/WhiteSymmetry/kececinumbers
6
6
  Author: Mehmet Keçeci
@@ -22,7 +22,7 @@ import warnings
22
22
  # importlib.reload(kececinumbers) # F821 undefined name 'kececinumbers'
23
23
 
24
24
  # Paket sürüm numarası
25
- __version__ = "0.5.7"
25
+ __version__ = "0.5.9"
26
26
  __author__ = "Mehmet Keçeci"
27
27
  __email__ = "mkececi@yaani.com"
28
28
 
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  # _version.py
3
3
 
4
- __version__ = "0.5.7"
4
+ __version__ = "0.5.9"
5
5
  __license__ = "MIT"
6
6
  __description__ = "Keçeci Numbers: An Exploration of a Dynamic Sequence Across Diverse Number Sets."
7
7
  __author__ = "Mehmet Keçeci"
@@ -572,6 +572,10 @@ def unified_generator(kececi_type: int, start_input_raw: str, add_input_raw: str
572
572
  raise ValueError(f"Invalid Keçeci Number Type: {kececi_type}. Must be between {TYPE_POSITIVE_REAL} and {TYPE_NEUTROSOPHIC_BICOMPLEX}.")
573
573
 
574
574
  # --- 1. Değişkenlerin Başlatılması ---
575
+ # Varsayılan bölme türünü ondalıklı olarak ayarla.
576
+ # Tamsayı tipleri (POSITIVE/NEGATIVE_REAL) bu değeri kendi blokları içinde ezecektir.
577
+ use_integer_division = False
578
+
575
579
  try:
576
580
  # Her sayı tipi, kendi `elif` bloğu içinde kendi girdisini işler.
577
581
  if kececi_type in [TYPE_POSITIVE_REAL, TYPE_NEGATIVE_REAL]:
@@ -735,52 +739,66 @@ def get_with_params(kececi_type_choice: int, iterations: int, start_value_raw: s
735
739
  return generated_sequence
736
740
 
737
741
  def get_interactive() -> Tuple[List[Any], Dict[str, Any]]:
738
- """Interactively gets parameters from the user to generate a sequence."""
739
- print("\n--- Keçeci Number Interactive Generator ---")
742
+ """
743
+ Interactively gets parameters from the user to generate a Keçeci Numbers sequence.
744
+ This version is improved for code clarity and compatibility with the module's
745
+ current interface.
746
+ """
747
+ print("\n--- Keçeci Numbers Interactive Generator ---")
740
748
  print(" 1: Positive Real 2: Negative Real 3: Complex")
741
749
  print(" 4: Float 5: Rational 6: Quaternion")
742
750
  print(" 7: Neutrosophic 8: Neutro-Complex 9: Hyperreal")
743
751
  print(" 10: Bicomplex 11: Neutro-Bicomplex")
744
752
 
753
+ # Get a valid number type from the user
745
754
  while True:
746
755
  try:
747
- type_choice = int(input("Select Keçeci Number Type (1-11): "))
756
+ type_choice = int(input("Select a Keçeci Number Type (1-11): "))
748
757
  if 1 <= type_choice <= 11:
749
758
  break
750
759
  print("Invalid type. Please enter a number between 1 and 11.")
751
760
  except ValueError:
752
761
  print("Invalid input. Please enter a number.")
753
762
 
754
- prompts = {
763
+ # User prompts for the starting value
764
+ start_prompts = {
755
765
  1: "Enter positive integer start (e.g., '10'): ",
756
766
  2: "Enter negative integer start (e.g., '-5'): ",
757
- 3: "Enter complex start (e.g., '3+4j' or '3' for 3+3j): ",
767
+ 3: "Enter complex start (e.g., '3+4j'): ",
758
768
  4: "Enter float start (e.g., '3.14'): ",
759
- 5: "Enter rational start (e.g., '7/2' or '5'): ",
760
- 6: "Enter quaternion (e.g., '1+2i-3j+k' or '2.5'): ",
761
- 7: "Enter neutrosophic start (e.g., '5+2I' or '7'): ",
769
+ 5: "Enter rational start (e.g., '7/2'): ",
770
+ 6: "Enter quaternion start (in 'w,x,y,z' format, e.g., '1.0,2.0,-3.0,1.0'): ",
771
+ 7: "Enter neutrosophic start (e.g., '5+2I'): ",
762
772
  8: "Enter complex base for neutro-complex (e.g., '1-2j'): ",
763
- 9: "Enter hyperreal start (e.g., '5+3e' or '10'): ",
773
+ 9: "Enter hyperreal start (e.g., '5+3e'): ",
764
774
  10: "Enter complex base for bicomplex (e.g., '2+1j'): ",
765
775
  11: "Enter complex base for neutro-bicomplex (e.g., '1+2j'): "
766
776
  }
767
777
 
768
- start_prompt = prompts.get(type_choice, "Enter starting value: ")
769
- start_input_val_raw = input(start_prompt)
770
- #add_base_scalar_val = float(input("Enter base scalar increment (e.g., 9.0): "))
771
- if type_choice == TYPE_QUATERNION:
772
- add_input_val_raw = input("Enter quaternion increment (e.g., '1.3,-2.1,0.5,3.4'): ")
773
- else:
774
- # Diğer tipler için eski mantık devam edebilir veya hepsi için string istenir
775
- add_input_val_raw = input("Enter increment value: ")
778
+ # User prompts for the increment value
779
+ add_prompts = {
780
+ TYPE_QUATERNION: "Enter quaternion increment (in 'w,x,y,z' format, e.g., '1.3,-2.1,0.5,3.4'): "
781
+ }
782
+ default_add_prompt = "Enter increment value (e.g., '9.0'): "
783
+
784
+ # Get inputs from the user
785
+ start_input_val_raw = input(start_prompts.get(type_choice, "Enter starting value: "))
786
+ add_input_val_raw = input(add_prompts.get(type_choice, default_add_prompt))
776
787
  num_kececi_steps = int(input("Enter number of Keçeci steps (e.g., 15): "))
777
788
 
778
- sequence = get_with_params(type_choice, num_kececi_steps, start_input_val_raw, add_base_scalar_val)
789
+ # Generate the sequence with the correct parameter names and values
790
+ sequence = get_with_params(
791
+ kececi_type_choice=type_choice,
792
+ iterations=num_kececi_steps,
793
+ start_value_raw=start_input_val_raw,
794
+ add_value_raw=add_input_val_raw
795
+ )
779
796
 
797
+ # Gather the parameters in a dictionary to return
780
798
  params = {
781
799
  "type_choice": type_choice,
782
800
  "start_val": start_input_val_raw,
783
- "add_val": add_base_scalar_val,
801
+ "add_val": add_input_val_raw,
784
802
  "steps": num_kececi_steps
785
803
  }
786
804
  return sequence, params
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kececinumbers
3
- Version: 0.5.7
3
+ Version: 0.5.9
4
4
  Summary: Keçeci Numbers: An Exploration of a Dynamic Sequence Across Diverse Number Sets
5
5
  Home-page: https://github.com/WhiteSymmetry/kececinumbers
6
6
  Author: Mehmet Keçeci
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
6
6
 
7
7
  [project]
8
8
  name = "kececinumbers"
9
- version = "0.5.7"
9
+ version = "0.5.9"
10
10
 
11
11
  # Diğer proje bilgileri (isteğe bağlı ama tavsiye edilir)
12
12
  authors = [
File without changes
File without changes
File without changes
File without changes
File without changes