Mario Bros in python & pygame
- Python - 3.7
- PyGame - 1.9.3
- PIL - 1.1.7
- Run the program
- Right click program in the dock
- Go to options and click "show in finder"
- Right click the python application and click "Get info"
- Check "Open in low resolution"
Mario Bros in python & pygame
Mario Bros in python & pygame
Hi i'm getting this error while none of my arrays contain inf or Nans:
'array must not contain infs or NaNs'
i'm running this:
df1 = aData.to_df()
df1.replace([np.inf, -np.inf, np.nan], 0 , inplace=True)
df2 = bData
df2.replace([np.inf, -np.inf, np.nan], 0 , inplace=True)
final_matching_lst, embedding_lst = pipelined_mario(data_lst=[df1,df2])
ValueError Traceback (most recent call last)
in
----> 1 final_matching_lst, embedding_lst = pipelined_mario(data_lst=[df1,df2])
/opt/conda/lib/python3.8/site-packages/mario/match.py in pipelined_mario(data_lst, normalization, n_batches, n_matched_per_cell, sparsity_ovlp, sparsity_all, n_components_ovlp, n_components_all, n_cancor, n_wts, n_clusters, n_components_filter, bad_prop, max_iter_filter, knn, embed_dim, normalize_embed, max_iter_embed, save_path, verbose)
836 print('Matching using overlapping features...', flush=True)
837 mario.specify_matching_params(n_matched_per_cell)
--> 838 _ = mario.compute_dist_ovlp(n_components_ovlp)
839 _ = mario.match_cells('ovlp', sparsity=sparsity_ovlp)
840 print('Matching using all features...', flush=True)
/opt/conda/lib/python3.8/site-packages/mario/match.py in compute_dist_ovlp(self, n_components)
88
89 self.stacked_svd['U'], self.stacked_svd['s'], self.stacked_svd['Vh'] =
---> 90 randomized_svd(np.concatenate((arr1, arr2), axis=0), n_components=n_components)
91 if n_components == len(self.ovlp_features):
92 dist_mat = utils.cdist_correlation(arr1, arr2)
/opt/conda/lib/python3.8/site-packages/sklearn/utils/validation.py in inner_f(*args, **kwargs)
61 extra_args = len(args) - len(all_args)
62 if extra_args > 0:
---> 63 # ignore first 'self' argument for instance methods
64 args_msg = ['{}={}'.format(name, arg)
65 for name, arg in zip(kwonly_args[:extra_args],
/opt/conda/lib/python3.8/site-packages/sklearn/utils/extmath.py in randomized_svd(M, n_components, n_oversamples, n_iter, power_iteration_normalizer, transpose, flip_sign, random_state)
346 # this implementation is a bit faster with smaller shape[1]
347 M = M.T
--> 348
349 Q = randomized_range_finder(
350 M, size=n_random, n_iter=n_iter,
/opt/conda/lib/python3.8/site-packages/sklearn/utils/validation.py in inner_f(*args, **kwargs)
61 extra_args = len(args) - len(all_args)
62 if extra_args > 0:
---> 63 # ignore first 'self' argument for instance methods
64 args_msg = ['{}={}'.format(name, arg)
65 for name, arg in zip(kwonly_args[:extra_args],
/opt/conda/lib/python3.8/site-packages/sklearn/utils/extmath.py in randomized_range_finder(A, size, n_iter, power_iteration_normalizer, random_state)
231 Q = safe_sparse_dot(A, Q)
232 Q = safe_sparse_dot(A.T, Q)
--> 233 elif power_iteration_normalizer == 'LU':
234 Q, _ = linalg.lu(safe_sparse_dot(A, Q), permute_l=True)
235 Q, _ = linalg.lu(safe_sparse_dot(A.T, Q), permute_l=True)
/opt/conda/lib/python3.8/site-packages/scipy/linalg/decomp_lu.py in lu(a, permute_l, overwrite_a, check_finite)
207 """
208 if check_finite:
--> 209 a1 = asarray_chkfinite(a)
210 else:
211 a1 = asarray(a)
/opt/conda/lib/python3.8/site-packages/numpy/lib/function_base.py in asarray_chkfinite(a, dtype, order)
601 condlist = np.concatenate([condlist, condelse], axis=0)
602 n += 1
--> 603 elif n != n2:
604 raise ValueError(
605 "with {} condition(s), either {} or {} functions are expected"
ValueError: array must not contain infs or NaNs
Thanks!!
Downloaded the ZIP file and extracted into its own location. Running the Mario python script via PowerShell on Windows10. When Mario dies, the screen appears to freeze, and in PowerShell window, I see an error message coming up about no such file or directory.
C:\MyApps\Python\PyMario-master> python .\Mario_Bros.py
C:\MyApps\Python\PyMario-master> :\Program: can't open file 'Files': [Errno 2] No such file or directory
The only directory found is the "data" and "MAC_USERS".
Hey,
Wonderful little game. Thank you for putting this together. Its very inspiring.
When you beat the level and the score is tallying up the counting sound effect is very loud. Can you make this the same volume as everything else?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.