Python Forum
Passing parameters with arrays and array definitions
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Passing parameters with arrays and array definitions
#2
if you wish to pass the entire array, just use array name:
and access as shown (i show a different name in the function definition, just to show you can do that, it could be same name or not, your choice)

example:
def show_array(myarray):
    print(myarray)

show_array(scores)
Reply


Messages In This Thread
RE: Passing parameters with arrays and array definitions - by Larz60+ - Jul-07-2022, 09:45 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Variable definitions inside loop / could be better? gugarciap 2 477 Jan-09-2024, 11:11 PM
Last Post: deanhystad
  Definitions in User-Created Functions and For Loops new_coder_231013 6 2,146 Dec-29-2021, 05:51 AM
Last Post: ndc85430
  Element misalignment passing numpy array with distutils OTAGOHARBOUR 1 2,073 Dec-06-2019, 01:47 AM
Last Post: OTAGOHARBOUR
  'Get closest value array in array of arrays.' follow up help. DreamingInsanity 10 7,369 Dec-05-2019, 06:30 PM
Last Post: DreamingInsanity
  Get closest value array for array of arrays. DreamingInsanity 2 2,371 Nov-18-2019, 03:55 PM
Last Post: DreamingInsanity
  Passing parameters to SQL Server using pandas Ilangos 8 16,554 Jun-03-2019, 11:25 AM
Last Post: Ilangos
  How do I split a large array into smaller sub-arrays? codebeacon 3 4,164 Apr-08-2019, 03:45 AM
Last Post: codebeacon
  how to work with variables changed in definitions Prof_Jar_Jar 2 2,639 Dec-16-2018, 12:04 AM
Last Post: Prof_Jar_Jar
  Passing parameters from C# to Python[for using in gensim] in Visual Studio 2017 ZoghbyAya 0 3,887 May-21-2018, 08:49 PM
Last Post: ZoghbyAya

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020