Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results for numpy
Search options not deleted
10 votes
2 answers
654 views

On scoring imported functions

For instance, in Python, the NumPy library provides the function eye which returns the nxn identity matrix. … from numpy import* seems like cheating, but by the wording of the other discussion, I think it could be argued that it's valid. …
Ogaday's user avatar
  • 469
0 votes

On scoring imported functions

For instance, as far as I understand, the numpy library is a third-party library independently developed from the Python language. … The existence of numpy is not guaranteed with any Python implementation. Hence from numpy import * is an incomplete implementation of the n×n identity matrix function. …
Kai Burghardt's user avatar
19 votes

Is a language with an extension a valid golfing language?

For example, if you're using Python + NumPy, you don't get import numpy as np for free. …
user avatar
4 votes
1 answer
110 views

Should "import" statement be included in byte count if I'm not using it directly [duplicate]

Another example is, I want to find out all positive number in an array: import numpy as np f = lambda x:x[x>0] f(np.array([1,3,-2,5,-4])) So, how should I score above codes? … Is the numpy answer valid? Should I include import numpy as in byte count? …
tsh's user avatar
  • 35.5k
-1 votes

Sandbox for Proposed Challenges

External modules, like numpy, as allowed. The most efficient program wins. …
Accept one day later's user avatar
9 votes
Accepted

Is "vim + plugins" a valid language?

Yes, it's valid in the same way that Python + NumPy (for example) is valid. …
user avatar
3 votes

Default for Code Golf: Input/Output methods

all of the following python types (and equivalents in other languages) acceptable in meeting the spec. list[list[T]] list[dict[int, T]] dict[int, list[T]] dict[int, dict[int, T]] dict[(int, int), T] # numpy
corvus_192's user avatar
  • 5,722
2 votes

Sandbox for Proposed Challenges

Libraries that facilitate matrix computations, such as numpy, are permitted. The winning criterion is code-golf. …
Rushabh Mehta's user avatar
10 votes

Where to find an online testing environment for specific programming languages?

Terminals: CentOS IPython Lua Memcached Mongo DB MySQL Node.JS Numpy Oracle Octave PowerShell PHP R Programming Redis Ruby Scipy Sympy IDEs: Ada (Gnat) Algol-68 Angular JS Assembly AsciiDoc Awk Bash …
6 votes

In bash, can I use non-coreutil programs

Similar things are done with internal libraries (Python 3, numpy, scikit, 100% or Bash + Cygwin (or WSL), 21 bytes) as well as with flags (i.e. …
Kevin Cruijssen's user avatar
0 votes

Sandbox for Proposed Challenges

count,str(success)) , end='\r') count += 1 success,image = vidcap.read() outvideo.release() vidcap.release() Python code to calculate avg Mean Square Error over two videos import cv2 import numpy
extracrispy's user avatar
0 votes

Sandbox for Proposed Challenges

. - Mots et Grumots (2003), Marc Escayrol #@title Setup common imports and functions import numpy as np import os import pandas as pd import tensorflow.compat.v2 as tf import tensorflow_hub as hub from …
Revolucion for Monica's user avatar
0 votes

Sandbox for Proposed Challenges

import random import numpy ### Bots ### class DoNothing: def __init__(self, index): return def turn(self, scoresheets, d, my_turn): return ([],[]) class AlwaysWhitesInRed: …
Renzeee's user avatar
  • 744
-2 votes

Sandbox for Proposed Challenges

import numpy as np from math import sqrt,sin,cos,acos def ex_unm(): """Example - Verification from UNM""" print("Example UNM") # Material Properties E = 29500 # (units = ksi) A = 1 …
WretchedLout's user avatar